It only remains for us to say that the fact that it is forbidden to keep a dog and interect closely with it does not mean that we should not be kind or feel compassion towards dogs if we see them in a pitiful state. These are two entirely separate matters. The Prophet (peace and blessings of Allaah be upon him) told us that "a man saw a dog biting the dust because of thirst, so he took his shoe and started to scoop water up with it until the dog’s thirst was quenched. Allaah appreciated his good deed and granted him entry to Paradise for it." (Reported by al-Bukhaari, no. 174).
According to another report, the Prophet (peace and blessings of Allaah be upon him) said: "Whilst a man was walking he became very thirsty, so he went down to a well and drank from it. When he came out, he saw a dog panting and biting the soil because of thirst. The man said, ‘He is suffering the same as I suffered,’ so he filled his shoe (with water), came out and let the dog drink until his thirst was quenched. Allaah appreciated his good deed and forgave him because of it." The people asked, "O Messenger of Allaah, will we be rewarded for how we treat animals?" He said, "In every living thing there is a reward." (Reported by al-Bukhaari, Fath, no. 2363)