Short answer
Yes, for a real need. In the Hanafi school you may keep a dog to guard your home or farm, herd, hunt, or as a guide or service dog. Keeping a dog only as a pet is not permitted, and it should not live inside the house. Being kind to dogs is still rewarded.
Keeping a dog for a need such as guarding, herding, farming, hunting or assisting a disabled person is permitted. Keeping one only as a pet or for show is not permitted (makruh tahrimi), and it should be kept out of the living areas of the home.
Other madhhabs
- Maliki
- Malikis regard the dog as pure, including its saliva, and some Maliki scholars took a lighter view of keeping dogs, though the school's main position also ties it to a need.
Explanation
Islam does not ask you to dislike dogs. The Prophet ﷺ told of a man whose sins Allah forgave because he climbed down a well and brought water up in his shoe for a thirsty dog. When the Companions asked if there is reward in animals, he said there is reward for kindness to every living being.
Keeping a dog is a separate question. The Prophet ﷺ said that whoever keeps a dog, except one for farming or livestock, loses a portion of reward from his deeds every day. Other narrations add hunting dogs. He also said angels do not enter a house with a dog in it. The scholars took two points from this: keeping a dog needs a reason, and the dog should not live in the house.
Recognised needs today:
- A guard dog for a house, farm or business where there is real fear of theft.
- A herding or farm dog.
- A hunting dog, whose trained catch the Quran allows you to eat.
- A guide dog for a blind person, a medical alert dog, or police and rescue dogs.
For an emotional support dog, ask a mufti about your situation. If you became Muslim with a pet dog, do not abandon it. Find it a good home with care, or if you must keep it for now, keep it outside the rooms where you pray. Read more in Dogs in Islam and is it haram to touch a dog.
The evidence
Quran, Surah Al-Maaida 5:4
يَسْـَٔلُونَكَ مَاذَآ أُحِلَّ لَهُمْ ۖ قُلْ أُحِلَّ لَكُمُ ٱلطَّيِّبَٰتُ ۙ وَمَا عَلَّمْتُم مِّنَ ٱلْجَوَارِحِ مُكَلِّبِينَ تُعَلِّمُونَهُنَّ مِمَّا عَلَّمَكُمُ ٱللَّهُ ۖ فَكُلُوا۟ مِمَّآ أَمْسَكْنَ عَلَيْكُمْ وَٱذْكُرُوا۟ ٱسْمَ ٱللَّهِ عَلَيْهِ ۖ وَٱتَّقُوا۟ ٱللَّهَ ۚ إِنَّ ٱللَّهَ سَرِيعُ ٱلْحِسَابِ ﴿٤﴾
They ask you, [O Muhammad], what has been made lawful for them. Say, "Lawful for you are [all] good foods and [game caught by] what you have trained of hunting animals which you train as Allah has taught you. So eat of what they catch for you, and mention the name of Allah upon it, and fear Allah." Indeed, Allah is swift in account.
The Quran allows trained hunting animals, which shows that keeping a dog for a purpose is lawful.
Sahih al-Bukhari 2322
Sahih... من أمسك كلبا فإنه ينقص كل يوم من عمله قيراط ...
"Whoever keeps a dog loses a qirat of his deeds every day, except a dog for farming or livestock."
Keeping a dog without need reduces your reward.
Sahih al-Bukhari 5949
Sahih... لا تدخل الملائكة بيتا فيه كلب ولا تصاوير ...
"Angels do not enter a house in which there is a dog or images."
A dog should not be kept inside the home.
Sahih al-Bukhari 2363
Sahih... في كل كبد رطبة أجر ...
"There is reward in every living being."
Kindness to dogs and all animals is rewarded.
Where the ruling is recorded
- al-Fatawa al-Hindiyya, Kitab al-Karahiyya. A dog should not be kept except for a need such as fear of thieves.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Buyu', miscellaneous issues of sale. Discusses selling and keeping dogs for guarding and hunting.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.