Riyad as-Salihin 126: On the Variety of Ways of Goodness
Abu Hurairah relates that the Holy Prophet said: A man proceeding along a track became very thirsty. Arriving at a well he descended into it and came out after taking a drink and saw a dog with its tongue lolling out trying to lick up mud from extreme thirst. The man thought this dog is suffering from thirst as I was suffering. So he descended once more into the well, filled his leather sock with water and came up holding it by his teeth and gave the dog a drink, Allah appreciated his action and forgave his sins. The Holy Prophet was asked: Messenger of Allah (saw), are we rewarded for kindness to animals also? He answered: There is a reward for kindness to every living thing (Bokhari and Muslim). Bokhari’s version concludes with: Allah appreciated his action, forgave his sins and admitted him to Paradise. Another version is: A dog was going round the brink of a well in an extremity of thirst, when a loose woman of the Bani Israel espied it. She lowered her leather sock into the well, drew up some water and gave the dog to drink. She was forgiven on account of this.