Chapter: The prohibition of keeping a dog except for hunting, herding, or farming
1688 – Ibn ʿUmar (may Allah be pleased with him) said: “I heard the Messenger of Allah (peace and blessings be upon him) say, ‘Whoever keeps a dog—apart from a dog for hunting or for herding livestock—will have two qirāṭs of his reward diminished each day.’” Agreed upon. Another wording has: “one qirāṭ.”
1689 – Abū Hurayrah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings be upon him) said: “Whoever keeps a dog will lose a qirāṭ of his deeds every day, except for a dog used in tillage or herding.” Agreed upon. In another narration by Muslim it reads: “Whoever keeps a dog that is neither for hunting, livestock, nor land will have two qirāṭs of his reward reduced each day.”
[Explanation]
The author (may Allah have mercy on him) states in his Riyāḍ al-Ṣāliḥīn under the heading “The prohibition of keeping a dog except for cultivation, hunting, or livestock.” A dog is well known and comes in various colors, but the black dog in particular is