Volume 3, Book 40, Number 551 :
Narrated by Abu Huraira (radiallaahu `anhu)
Allah’s Apostle (sallallaahu `alayhi wasallam) said, “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 Apostle (sallallaahu `alayhi wasallam)! Is there a reward for us in serving (the) animals?” He replied, “Yes, there is a reward for serving any animate.”
Many Muslims have misunderstood Islam’s teachings regarding dogs, and this misunderstanding has led to the mistreatment of these animals. The Prophet said, “Purifying a container that a dog has licked (in order for human’s to use it) is done by washing it seven times, the first washing being with dirt.”2 However, according to some scholars, a dog’s fur is considered pure3. Nonetheless, Muslims are discouraged from keeping dogs inside their homes, as the Prophet has been reported as saying that angels do not enter into a house that has a dog4.
However, just because one does not keep a dog inside the home and doesn’t drink after it, that does not give one the right to neglect it, mistreat it, or kill it. The usefulness of this creature of God is indisputable. No other animal can compete with it in its loyalty to its caregiver, its abilities as a guard, and its talent for hunting. In fact, the Qur’an narrates in Surat Al-Kahf, or “The Cave,” the story of some pious youths who took refuge in a cave from the persecution and violence of the unbelievers. That these righteous people had a dog with them, and the fact that Allah mentions the dog and counts the dog among them, indicates that dogs are permitted to live among people. [And you would have thought them awake, whereas they were asleep. And We turned them on their right and on their left sides, and their dog stretching forth his two forelegs at the entrance (of the cave as a guard)] (Al-Kahf 18:18).
So dogs may be used for guards as well as for hunting, as the Qur’an also states: [They ask you about what is lawful for them (as food); Say: Lawful unto you are (all) things good and pure: and those beasts and birds of prey which you have trained as hounds, training and teaching them (to catch) in a manner as directed to you by Allah; so eat what they catch for you, but pronounce the name of Allah over it and fear Allah, for Allah is swift in reckoning] (Al-Ma’idah 5:4).
In two separate hadiths narrated by Abu Hurayrah (the cat-loving Companion), the Prophet told his Companions of the virtue of saving the life of a dog by giving it water and quenching its thirst: one referred to was a man who was blessed by Allah for giving water to a thirsty dog. The other was a prostitute, who filled her shoe with water and gave it to a dog that was lolling its tongue in thirst. For this deed she was granted the ultimate reward: eternal Paradise.
Islam asks people to reflect upon this and be aware of each person’s duty toward God’s creatures, which He has put on earth for our use, not for our abuse. When the Prophet was asked if God rewarded acts of charity to the animals, he replied, “Yes, there is a reward for acts of charity to every beast alive.”
 Narrated by Muslim.
 See Fiqh Us-Sunnah by Sayyid Sabiq.
 Narrated by Al-Bukhari and Muslim.
Taken from: http://www.islamawareness.net/Animals/love.html
More on the issue of dogs here.