Narrated Abu Hurairah: Allah’s Messenger, peace be upon him, said, that while a man was walking he felt thirsty and went down a well and drank water from it. On coming out of it, he saw a dog panting and eating mud because of excessive thirst. The man said, “This (dog) is suffering from the same problem as that of mine.” So (he went down the well), filled his shoe with water, caught hold of it with his teeth and climbed up and watered the dog. Allah thanked him for his (good) deed and forgave him.”

The people asked, “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.”
[3: 551- O.B. Sahih Al-Bukhari)

Narrated Abu Hurairah: Allah’s Messenger, peace be upon him, said, “A prostitute passed by a panting dog near a well and saw that the dog was about to die of thirst. She took off her leather sock or shoe, and tied it with her head-cover and drew out some water for it. So, Allah forgave her because of that.”
[4: 538- O.B. Sahih Al-Bukhari]