(23) باب الآبَارِ عَلَى الطُّرُقِ إِذَا لَمْ يُتَأَذَّ بِهَا
Narrated Abu Huraira:
The Prophet (ﷺ) said, "A man felt very thirsty while he was on the way, there he came across a well. He went down the well, quenched his thirst and came out. Meanwhile he saw a dog panting and licking mud because of excessive thirst. He said to himself, "This dog is suffering from thirst as I did." So, he went down the well again and filled his shoe with water and watered it. Allah thanked him for that deed and forgave him. The people said, "O Allah's Messenger (ﷺ)! Is there a reward for us in serving the animals?" He replied: "Yes, there is a reward for serving any animate (living being)." (See Hadith No. 551)
Reference: Sahih al-Bukhari 2466
In-book reference: Book 46, Hadith 27
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 43, Hadith 646