Dogs in Islam, as they are in Rabbinic Judaism, are conventionally thought of as ritually impure. This idea taps into a long tradition that considers even the mere sight of a dog during prayer to have the power to nullify a pious Muslim’s supplications. Similar to many other mistakenly viewed aspects of Islamic history, today both most Muslims and non-Muslims think that Islam and dogs don’t mix.

There is, however, quite a different unknown strand of thinking about dogs in Islam, a long history of positive interactions between Muslims and dogs that goes back to the religion’s very beginnings. According to several authoritative accounts of his life and teachings, the Prophet Muhammad himself prayed in the presence of dogs. Many of his cousins and companions, the world’s first Muslims, raised young puppies. In the Mosque of the Prophet in Medina, the second holiest site in the world for Muslims after the Kaaba, dogs were regularly seen frolicking about during the Prophet’s life and for centuries after as well.

It’s no surprise that the first Muslims had so many dogs. Most of them kept large flocks of sheep and goats, and dogs helped to manage and protect these other animals, preventing them from running away and scaring off would-be thieves and predators. Sheep and goats were these early Muslims’ food and capital, and dogs helped to protect these investments.

Canines were also crucial companions during hunting expeditions. Long before Islam, dogs were depicted in stone carvings from ancient Egypt and Iraq running alongside their human owners. Muslims continued this use of dogs.

As Islam spread throughout the Middle East and the world, it moved from being a religion of nomadic peoples to one centered in cities. Many of the world’s largest cities in the millennium between 700 and 1700 were Muslim cities. As they did in the countryside, in cities too dogs played vital roles. They of course continued to protect property and shoo away intruders, but in cities dogs served an even more important function—they ate garbage. From Damascus and Baghdad to Cairo and Istanbul, urban authorities supported dog populations as consumers of waste to keep city streets clean. Muslim leaders built watering troughs for dogs, many mosques threw out food for them, and butchers used them to keep away rats and other vermin. Humans who committed violence against urban canines were often punished. Muslim cities were much cleaner and more pleasant places with dogs than without them.

All of this meant that Muslims throughout the world were in regular daily contact with the many dogs in their midst. They recognized how useful canines were as guards and cleaning agents and, we can only presume, developed quite intimate relationships with them built around regular contact and the kind of affection bred from codependence.

Given this history, where then did the idea that Islam is only hostile to dogs come from? The short answer is disease. About two hundred years ago, ideas about contagion began to change. Still very far from what we would today recognize as germ theory, people in the Middle East, Europe, and elsewhere started to notice a correlation between outbreaks of plague, cholera, and malaria and the physical proximity of victims to places like cemeteries, garbage heaps, and swampy lakes. City planners and governments throughout the Middle East therefore started to excise these sources of disease from the increasingly crowded districts in which their people lived. As they collected and then pushed garbage outside city walls, they also unwittingly removed the dogs that ate this trash. Dogs used to keep streets clean. Now humans did.

The historic connections between dogs and trash did not serve the animal well. Not only was there simply less garbage to eat in cities, but the garbage that did remain was now seen as a threat to public hygiene and soon too were its canine consumers. Indeed, in just a few decades in the early nineteenth century, dogs came to be seen as both economically useless and hazardous to public health. The results? Several large-scale dog eradication campaigns, far fewer dogs in Middle Eastern cities, and a change in attitude toward the animal. No longer useful and productive urban residents, dogs were now seen as dangerous, disease-ridden, and expendable.

This relatively recent sea change in Muslim attitudes towards dogs explains the dominant view of the animal today. While of course opinions vary and the elite in many Muslim countries keep dogs as status symbols, the majority of Muslims see dogs as dirty, impure, sometimes even evil. As with so much in the Islamic past today, the history of dogs is thus misunderstood by Muslims and non-Muslims alike. Most don’t know and many would likely not be open to the idea that dogs were treasured by the Prophet and millions of Muslims after him.

For those of us—Muslims or otherwise—whose most regular interaction with a living nonhuman animal is with a dog, the story of dogs in Islam offers another lesson as well. Humans did not always keep dogs for affection, love, or cuteness. For most of history, they were not pets. They were laborers, economic necessities, hunters, and street cleaners. Apart from dogs that sniff drugs, aid the blind, or chase criminals, very few of us today experience dogs as anything other than that joy that licks our face in the morning. However, throughout history they’ve been much more. Knowing this past not only gives us a fuller picture of the most ubiquitous nonhuman animal we welcome in our midst, but it also helps us to understand how our histories with other animals have shaped our current world.

Featured image credit: Edit -1-24 by Dane. CC-BY-2.0 via Flickr.