Researchers have shed light on the chemistry that bonds one person to another by taking brain scans of men being stroked while in their underpants.

The Finnish study found that gentle stroking – which was not in sexually arousing areas – changed levels of opioid brain chemicals which work behind the scenes to form lasting bonds in animals.

The findings suggest that opioids might be the critical chemicals that enables human brains to distinguish between strangers and people who are closer to us, such as friends, families and lovers.

"We know this is hugely important for humans because we have these strong, lasting bondings with friends and relatives and so on. But what kind of system maintains these bonds, and makes them last?" said Lauri Nummenmaa who studies the neural circuitry of emotions at Aalto University in Finland.

Studies in animals have shown that opioids can play a crucial role in pairing up. Prairie voles are monogamous in the wild, but when given a drug that blocks opioid in their brains, they seek out other partners. If opioids are blocked in monkeys, they groom others less and neglect their babies.

To see whether opioids were important in human bonding, the researchers invited nine couples into the lab. The men stripped off to their underpants and lay under a blanket in a PET scanner. The first scan was taken while the men were alone. For the second, their partners touched them gently all over, but avoided anywhere likely to arouse them sexually.

"I'm really proud of the Finnish general public," said Nummenmaa. "We had no problem whatsoever in recruiting people for the experiment."

When the researchers compared the men's scans, they noticed that gentle stroking caused a drop in natural opioids in brain areas called the ventral striatum and the anterior cingulate cortex, which are mainstays of the brain's reward circuitry. This was counter to expectations: they had expected levels to rise.

Nummenmaa said that opioid might work in a similar way to a painkiller, with the body needing less the more comfortable it was. "The opioid system is typically engaged during pain, so you get a boost in painful situations. The social touching might be doing exactly the opposite. You can think of it as pain alleviation. That might be the underlying mechanism for why hooking up with others makes us feel so good in the first place," said Nummenmaa. Details of the study were given at the Society for Neuroscience meeting in San Diego.

Opiate drugs have the same effect as the body's natural opioids, and just as people build up tolerances to drugs, develop cravings, and suffer withdrawal symptoms, similar processes play out with relationships.

"If something similar happens when you are establishing social bonds that would make perfect sense. You would need your daily fix, or at least a fix now and then, and unless you got that you would start to feel pain," said Nummenmaa.