QuranHubOnline Quran Academy

QuranHub · Online Quran Academy

Can Muslims Have Dogs?

By Nazeer AhmadFounder, QuranHub Online Quran AcademyM.A. Arabic & IslamiyatDars-e-Nizami (Tanzeem-ul-Madaris)10+ years teaching Quran and Islamic studies

Dogs are the most misunderstood animal in Islamic law. Ask one Muslim and you will hear dogs are dirty and forbidden; ask another and you will hear the Quran itself praises a dog. Both have heard something true — and both are missing the rest. The Quran honours a dog that guarded righteous sleepers in a cave, the Sunnah allows dogs for hunting, herding, and guarding, and the same Sunnah warns that keeping a dog as a pet costs reward every day and that its saliva is impure.

This guide puts the whole picture together: the dog of the cave, the three allowed uses, the angels hadith, the qirat warning, the washing rule, and the famous difference between the schools — including the Maliki school, which holds the dog pure. This is guidance, not a fatwa: for your own situation, consult a qualified scholar you trust.

  • Free 3-day trial · no credit card
  • Live 1-on-1 online classes
  • Qualified male & female tutors
  • In every timezone

The dog of the cave: the Quran honours a dog

The Quran's most famous dog belongs to the sleepers of the cave, the young believers who fled persecution and slept for years under Allah's protection. Allah describes their dog with them, at the entrance: 'And their dog stretched his forelegs at the entrance' (Quran 18:18). The commentators note the dog lay at the threshold like a guard — and the verse carries no blame toward it at all.

That matters because it shows Islam does not hate dogs. The Quran also makes lawful what trained hunting dogs catch: 'Lawful for you are all good foods and 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' (Quran 5:4). A dog doing its work — guarding, hunting, herding — is part of the life Allah made lawful.

  • Arabic (18:18): وَكَلْبُهُمْ بَاسِطٌ ذِرَاعَيْهِ بِالْوَصِيدِ
  • Translation: And their dog stretched his forelegs at the entrance
  • Arabic (5:4): وَمَا عَلَّمْتُمْ مِنَ الْجَوَارِحِ مُكَلِّبِينَ تُعَلِّمُونَهُنَّ مِمَّا عَلَّمَكُمُ اللَّهُ فَكُلُوا مِمَّا أَمْسَكْنَ عَلَيْكُمْ
  • Translation: Eat of what your trained hunting animals catch for you, and mention the name of Allah upon it

The three allowed uses: hunting, herding, and guarding

The Prophet said: 'Whoever keeps a dog, one qirat of the reward of his good deeds is deducted daily, unless the dog is used for guarding a farm or cattle' — and in another narration, 'unless it is used for guarding sheep or farms, or for hunting' (Sahih al-Bukhari 2322). Three uses are named across the narrations: hunting, herding livestock, and guarding farms and property. A dog kept for one of these is not only allowed; it is doing the work the Quran and Sunnah describe.

That is why the question 'can Muslims have dogs?' has no single one-word answer. A farmer's guard dog, a shepherd's herding dog, and a hunter's trained dog are all allowed by the texts themselves. The restriction is on keeping a dog with no such need — as a pet, for company, or as a status symbol — and even there, as we will see, the schools describe the ruling differently.

  • Arabic (Bukhari 2322): مَنْ أَمْسَكَ كَلْبًا يَنْقُصْ مِنْ عَمَلِهِ كُلَّ يَوْمٍ قِيرَاطٌ إِلَّا كَلْبَ حَرْثٍ أَوْ كَلْبَ مَاشِيَةٍ
  • Translation: Whoever keeps a dog loses one qirat of his reward every day — except a dog for farming or for livestock
  • Allowed: hunting dogs, herding dogs, and guard dogs for farms and property
  • The same narrations extend the exception to hunting — the three uses are named together

The two warnings: angels and the qirat

The Prophet said: 'Angels do not enter a house in which there is a dog or a picture' (Sahih al-Bukhari 3322). Scholars explain that the angels meant here are the angels of mercy, and that the warning shows how seriously the Sunnah treats keeping a dog inside the home without need. It is not a statement that dogs are evil — the dog of the cave shows otherwise — but that the home is a place of worship and angels, and a pet dog does not belong in it.

The qirat warning is the second one: a daily deduction from reward. In the Hanafi school, keeping a dog as a mere pet is makruh tahrimi — prohibitively disliked — while keeping a dog for hunting, herding, or guarding is allowed. Most commentators read the qirat hadiths as a sign that keeping a pet dog is prohibited, while the Maliki scholar Ibn Abd al-Barr read the same wording as showing it is disliked (makruh) rather than forbidden. That difference matters for how the ruling is phrased — but notice that even the lenient reading does not call pet-keeping good. It calls it something a careful Muslim avoids.

  • Arabic (Bukhari 3322): لَا تَدْخُلُ الْمَلَائِكَةُ بَيْتًا فِيهِ كَلْبٌ وَلَا صُورَةٌ
  • Translation: Angels do not enter a house in which there is a dog or a picture
  • Hanafi position: keeping a dog as a mere pet is makruh tahrimi (prohibitively disliked); hunting, herding, and guard dogs are allowed
  • Most commentators read the qirat hadiths as a prohibition on pet-keeping
  • Ibn Abd al-Barr (Maliki) read them as showing it is disliked (makruh), not forbidden

Is the dog impure? The Hanafi position and the famous Maliki exception

The schools differ over whether the dog itself is impure, and this is where the Hanafi position matters. The Hanafi school holds that the dog's hair and body are pure, but its saliva is impure — which is why the washing rule applies to what a dog has licked. The Shafi'i and Hanbali schools hold the whole dog impure, including its hair. The washing then differs too: in the Hanafi school a vessel a dog has licked is washed three times, with no obligation to use soil, while the Shafi'i and Hanbali schools require seven washes, one of them with soil.

The Maliki school is the famous exception: it holds the living dog pure, including its saliva, and treats the washing of a licked vessel as a devotional command to be obeyed, not as proof the dog is filthy. Egypt's Dar al-Ifta follows the Maliki view. So a Maliki Muslim who pets a dog and then prays is following a genuine scholarly position — and a Shafi'i Muslim who washes seven times is following one too. Dog impurity is a real difference of the schools, not a simple right and wrong.

  • Hanafi: the dog's hair and body are pure; its saliva is impure; a licked vessel is washed three times (seven washes, one with soil, is recommended as a precaution, not obligatory)
  • Shafi'i and Hanbali: the whole dog is impure; a licked vessel is washed seven times, one wash with soil
  • Maliki: the dog and its saliva are pure; the seven washes are a devotional command
  • Arabic (Muslim 279): إِذَا وَلَغَ الْكَلْبُ فِي إِنَاءِ أَحَدِكُمْ فَلْيُرِقْهُ ثُمَّ لِيَغْسِلْهُ سَبْعَ مَرَّاتٍ

The washing rule: three times in the Hanafi school, seven in the Shafi'i and Hanbali schools

The Prophet said: 'When a dog licks a utensil belonging to any one of you, the contents should be thrown away, and the utensil should be washed seven times' (Sahih Muslim 279). Some narrations add that one of the seven washes should be with earth or soil. The schools apply this hadith differently: the Hanafi school holds that three washes are enough for a licked vessel, with no obligation to use soil — washing seven times, one with soil, is recommended as a precaution, not required — while the Shafi'i and Hanbali schools require all seven washes, one of them with soil. The rule is about vessels — bowls and cups a dog has licked — and the schools then apply it differently to clothing and skin, as set out above.

In practice: if a dog licks your bowl, wash it three times in the Hanafi school (seven times, one with soil, in the Shafi'i and Hanbali schools; the Maliki school treats the seven washes as a devotional command). If a dog licks your hand or your clothes, wash the place three times in the Hanafi school — or until the impurity is gone — while the Shafi'i and Hanbali schools require seven washes, one with soil; the Maliki school does not treat the touch as impurity at all. Follow your school, and do not turn a difference of the schools into an argument with your family.

  • Sahih Muslim 279: throw away the contents, wash the vessel seven times
  • Some narrations add one wash with earth — the Shafi'i and Hanbali schools require it
  • The rule is about vessels; clothing and skin follow each school's view
  • Follow your school's practice and do not make it a family argument

Practical answers: guide dogs, neighbours' dogs, and kindness to animals

Guide dogs and assistance dogs are the question most often asked after pets. Scholars who allow dogs for need generally include working dogs that a person depends on — a guide dog for a blind person or an assistance dog for a disabled person is a need, not a luxury, and necessity has its own place in the law. If you depend on a working dog, ask a qualified scholar about the details of your case, including prayer and purity, rather than assuming the ruling from a general guide.

Kindness to animals is a separate duty from the keeping question. The Prophet told of a person forgiven for giving water to a thirsty dog, and kindness to a neighbour's dog — not harming it, not frightening it, giving it water if it is thirsty — is good character. A Muslim who cannot keep a dog can still be kind to one. And if you already have a pet dog, do not abandon it to suffer: rehome it responsibly, and ask a scholar about the best way to do so.

  • Guide and assistance dogs: a genuine need, not a luxury — ask a scholar about your own case
  • Kindness to dogs is a duty even for those who do not keep one
  • Never abandon a pet to suffer — rehome it responsibly
  • The rules on keeping and the duty of kindness are two different questions

Frequently asked questions

Is it haram to touch a dog?+

Touching a dog does not make you a sinner in any school. The question is ritual purity, not sin: in the Hanafi school the dog's dry hair is pure and its saliva is impure, and a place the dog's saliva touched is washed three times; in the Shafi'i and Hanbali schools the whole dog is impure, and the wash is seven times, one with soil; in the Maliki school the dog is pure entirely. If a dog licks you, wash the place — in the Hanafi school, three times.

Can I keep a dog for security at my house?+

Yes — guarding property is one of the three uses named in the hadiths, alongside hunting and herding. Scholars extend it to guard dogs kept outside the house for a real security need. The dog should still live outside the living areas of the house, and the angels hadith is the reason scholars keep it out of the home itself.

Does having a dog stop my prayers from being accepted?+

No — nothing in the evidence says a Muslim who has touched a dog can never pray, or that past prayers are wasted. The ruling is about purity: wash what the dog's saliva touched, following your school, and then pray. The angels hadith is about angels of mercy entering a house with an indoor pet dog, not about your prayer being rejected outright.

What is the Maliki view, and can I follow it?+

The Maliki school holds the living dog pure, including its saliva, and treats the seven washes of a licked vessel as a devotional command. It is a genuine position of a major school, followed by Egypt's Dar al-Ifta. Whether you may follow it depends on your own practice: if you follow the Hanafi school, follow its view; changing schools for convenience is not the way scholars advise.

I already have a pet dog. What should I do?+

Do not abandon it — kindness to animals is a duty in Islam. Rehome it responsibly to someone who will care for it, or to family who can keep it outside as a guard or working dog. Speak to a qualified scholar about your own situation, and keep treating the dog kindly until it is settled.