Language:
كتاب العمل فى الصلاة
21  
Actions while Praying
(11)
Chapter: If an animal runs away while one is in Salat
(11)
باب إِذَا انْفَلَتَتِ الدَّابَّةُ فِي الصَّلاَةِ
Sahih al-Bukhari 1211

Narrated Al-Azraq bin Qais:

We were at Al-Ahwaz fighting the Al-Haruriya (tribe). While I was at the bank of a river a man was praying and the reins of his animal were in his hands and the animal was struggling and he was following the animal. (Shu`ba, a sub-narrator, said that man was Abu Barza Al-Aslami). A man from the Khawarij said, "O Allah! Be harsh to this sheik." And when the sheik (Abu Barza) finished his prayer, he said, "I heard your remark. No doubt, I participated with Allah's Messenger (ﷺ) in six or seven or eight holy battles and saw his leniency, and no doubt, I would rather retain my animal than let it return to its stable, as it would cause me much trouble. "

حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا الأَزْرَقُ بْنُ قَيْسٍ، قَالَ كُنَّا بِالأَهْوَازِ نُقَاتِلُ الْحَرُورِيَّةَ، فَبَيْنَا أَنَا عَلَى جُرُفِ نَهَرٍ إِذَا رَجُلٌ يُصَلِّي، وَإِذَا لِجَامُ دَابَّتِهِ بِيَدِهِ فَجَعَلَتِ الدَّابَّةُ تُنَازِعُهُ، وَجَعَلَ يَتْبَعُهَا ـ قَالَ شُعْبَةُ ـ هُوَ أَبُو بَرْزَةَ الأَسْلَمِيُّ ـ فَجَعَلَ رَجُلٌ مِنَ الْخَوَارِجِ يَقُولُ اللَّهُمَّ افْعَلْ بِهَذَا الشَّيْخِ‏.‏ فَلَمَّا انْصَرَفَ الشَّيْخُ قَالَ إِنِّي سَمِعْتُ قَوْلَكُمْ، وَإِنِّي غَزَوْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم سِتَّ غَزَوَاتٍ أَوْ سَبْعَ غَزَوَاتٍ وَثَمَانِيًا، وَشَهِدْتُ تَيْسِيرَهُ، وَإِنِّي أَنْ كُنْتُ أَنْ أُرَاجِعَ مَعَ دَابَّتِي أَحَبُّ إِلَىَّ مِنْ أَنْ أَدَعَهَا تَرْجِعُ إِلَى مَأْلَفِهَا فَيَشُقَّ عَلَىَّ‏.‏
Reference : Sahih al-Bukhari 1211
In-book reference : Book 21, Hadith 15
USC-MSA web (English) reference : Vol. 2, Book 22, Hadith 302
  (deprecated numbering scheme)