You don’t have to be a “dog person” to recognize that some people seem to have more of a connection with man’s best friend than others. For some, understanding a dog’s emotions seems to come naturally, even if they don’t have a pup of their own. A new study attempts to reveal why that is, and it suggests that while some of our understanding of canine behavior is easily learned, it’s a combination of our upbringing and our ancestry that gives us a special connection with dogs.

The research, which was published in Scientific Reports, tasked over 150 participants from Europe and Morocco with recognizing dog emotions. The volunteers were recruited in groups, with both adults and children between the ages of five and six. The participants included non-Muslim Europeans as well as practicing Muslims both in Europe and in Morocco.

The researchers say that the decision to select the pool of volunteers based on their heritage was due to the fact that Muslim culture doesn’t prioritize dog ownership in the same way that it is encouraged in non-Muslim European households.

In traditional communities in Muslim countries, dogs are often viewed as impure and rarely integrated as part of the family. Clearly, this has nothing to do with the mistaken notion that Muslims would hate dogs, and simply implies that different societies may importantly differ in their general attitude to dogs.

This offered the scientists a way to measure the recognition of canine emotions in a group of individuals who didn’t experience an abundance of interaction with canines while growing up. Whereas the non-Muslim European group had much more familiarity with dogs by default.

One theory as to why humans and dogs get along so well is called co-domestication. It’s the idea that, over the course of human history, interactions with dogs based on survival and friendship may have imprinted a love of dogs into our DNA, so to speak. If that’s the case, individuals who grew up in households without dogs, and had very few interactions with them, should have the ability to recognize dog emotions.

After testing all of the volunteers on their ability to recognize facial expressions and body language in dogs, it looks like that theory holds water, at least to a point. The children who participated in the study exhibited an inherent ability to read certain dog emotions, mainly anger or excited happiness, and there was little difference between the Muslim and non-Muslim groups in this regard.

The adult group showed a much greater ability to recognize emotions in dogs if they had grown up in a dog-positive culture. The Muslim non-owners in both Europe and Morocco found it more difficult to accurately gauge the emotions of dogs than their non-Muslim counterparts, suggesting that regular exposure to the animals is the key to better understanding their behavior.

In an interesting twist, the researchers also measured how well the participants could recognize emotions in chimpanzees. Primates are our closest relatives in the animal kingdom, but none of the groups of volunteers showed an ability to read their emotions. Even Muslims in Morocco were better at grasping dog emotion than the emotions of chimps, suggesting that there may be something to the notion that humans have at least a basic built-in understanding of canine behavior.

Mike Wehner has reported on technology and video games for the past decade, covering breaking news and trends in VR, wearables, smartphones, and future tech. Most recently, Mike served as Tech Editor at The Daily Dot, and has been featured in USA Today, Time.com, and countless other web and print outlets. His love of reporting is second only to his gaming addiction.