(10) بَاب الْأَمْرِ بِقَتْلِ الْكِلَابِ وَبَيَانِ نَسْخِهِ وَبَيَانِ تَحْرِيمِ اقْتِنَائِهَا إِلَّا لِصَيْدٍ أَوْ زَرْعٍ أَوْ مَاشِيَةٍ وَنَحْوِ ذَلِكَ
Ibn Umar (Allah be pleased with them) reported that Allah's Messenger (may peace be, upon him) ordered the killing of dogs except the dog tamed for hunting, or watching of the herd of sheep or other domestic animals. It was said to Ibn Umar (Allah be pleased with them) that Abu Huraira (Allah be pleased with him) talks of (exception) about the dog for watching the field, whereupon he said:
Since Abu Huraira (Allah be pleased with him) possessed land.
Reference: Sahih Muslim 1571
In-book reference: Book 22, Hadith 58
USC-MSA web (English) reference(deprecated numbering scheme): Book 10, Hadith 3812