Al-Adab Al-Mufrad, Book 20, Hadith 378 (English) ⓘ
Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "One day a man became very thirsty while walking down the road. He came across a well, went down into it, and drank and then climbed out. In front of him he found a dog panting, eating the dust out of thirst. The man said, 'This dog is as thirsty as I was.' He went back down into the well and filled his shoe, putting it into his mouth (in order to climb back up) and then gave the dog water. Therefore Allah thanked him and forgave him." They said, "Messenger of Allah, will we have a reward on account of animals?" He said, "There is a reward on account of every living thing."
حَدَّثَنَا إِسْمَاعِيلُ قَالَ: حَدَّثَنِي مَالِكٌ، عَنْ سُمَيٍّ مَوْلَى أَبِي بَكْرٍ، عَنْ أَبِي صَالِحٍ السَّمَّانِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللهِ صلى الله عليه وسلم قَالَ: بَيْنَمَا رَجُلٌ يَمْشِي بِطَرِيقٍ اشْتَدَّ بِهِ الْعَطَشُ، فَوَجَدَ بِئْرًا فَنَزَلَ فِيهَا، فَشَرِبَ ثُمَّ خَرَجَ، فَإِذَا كَلْبٌ يَلْهَثُ، يَأْكُلُ الثَّرَى مِنَ الْعَطَشِ، فَقَالَ الرَّجُلُ: لَقَدْ بَلَغَ هَذَا الْكَلْبَ مِنَ الْعَطَشِ مِثْلُ الَّذِي كَانَ بَلَغَنِي، فَنَزَلَ الْبِئْرَ فَمَلَأَ خُفَّاهُ، ثُمَّ أَمْسَكَهَا بِفِيهِ، فَسَقَى الْكَلْبَ، فَشَكَرَ اللَّهُ لَهُ، فَغَفَرَ لَهُ، قَالُوا: يَا رَسُولَ اللهِ، وَإِنَّ لَنَا فِي الْبَهَائِمِ أَجْرًا؟ قَالَ: فِي كُلِّ ذَاتِ كَبِدٍ رَطْبَةٍ أَجْرٌ.
also referenced under: Hadith 378 (Reference) & Book 20, Hadith 7 (In-Book)