The Book of Transactions (Kitab Al-Buyu`)

Muslim :: Book 10 : Hadith 3814

Ibn Mughaffal reported: Allah's Messenger (may peace be upon him) ordered the killing of dogs and then said: what is the trouble with them (the people of Medina)? How dogs are nuisance to them (the citizens of Medina)? He then permitted keehing of dogs for hunting and (the protection of) herds. In the hadith transmitted on the authority of Yahya, he (the Holy Prophet) permitted the keeping of dogs for (the protection of) herds, for hunting and (the protection of) cultivated land.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star