The insistent, undeniable rituals caused by obsessive-compulsive disorder (OCD) complicate life for more than 2 percent of the world's population, and we may now have our best understanding yet of where these relentless urges come from.

Scientists have just announced the identification of four genes linked with OCD behaviours in people – and to help them make the discovery they didn't just look at humans, but at biological markers found in dogs and mice too.

"We were seeking ways to take advantage of information from other species in order to inform and focus the study in humans," says computational biologist Hyun Ji Noh from the Broad Institute of MIT and Harvard in Cambridge, Massachusetts.

"Each additional species that we looked at gave us more information about possible factors in the brain that contribute to OCD."

Noh's team compiled a list of genetic associations observed in previous studies of human OCD, and also analysed the results of research into compulsive behaviour in mice, and in dogs, where it's called canine compulsive disorder (CCD).

They ended up with an array of around 600 genes that looked to be tied to OCD or its variants, which can urge people to do things like obsessively check or clean items around the house, or wash their hands – and, in animals like dogs, it provokes similarly compulsive acts.

"Dogs, it turns out, are surprisingly similar to people," one of the researchers, geneticist Elinor Karlsson told NPR.

"They're chasing their own tail or chewing themselves or chasing shadows like normal, but they're doing it for hours. They literally can't stop."

With their 600 candidate genes in hand, the team examined 592 people with OCD and compared them to 560 people without the condition.

This helped them to cull the list down to just four genes expressed in the brain – called NRXN1, HTR2A, CTTNBP2, and REEP3 – which, when they undergo mutations, are significantly associated with human OCD.

According to the team, those associations could provide some promising new leads in terms of potential treatments for OCD, especially since the mechanisms behind the condition have so far been difficult to ascertain.

"There had been a few studies that looked for genes associated with OCD, and they found some interesting ones, but they were never able to achieve statistical significance," Karlsson explained to NPR.

These gene variants are predicted to disrupt synapse development and interfere with neural pathways in an area of the brain called the cortico-striatal loop, messing up things like serotonin and glutamate signalling.

If you've got the mutations, it doesn't mean that you'll necessarily develop OCD – as there are also environmental factors to consider – but it does make such an eventuality more probable, the team think.

"OCD is a really complicated disease," Karlsson says.

"All we can say is if you have variations in these genes, you are more likely to have OCD."

On the bright side, NRXN1 and REEP3 have previously been found to be of relevance in studies looking at autism spectrum disorder, so it's possible continued research will learn more about potential causes and treatments for more than just OCD.

If so, even more people could stand to benefit from these important discoveries – and maybe some dogs and mice too.

The findings are reported in Nature Communications.