Having a healthy network of friends can do you a lot of good, but can it also save you from a lot of pain? Researchers reporting in the journal Scientific Reports seem to think so.

They say that one's ability to tolerate pain can actually predict the size of one's social network, and they came to their conclusion by inflicting, well, pain.

Some 101 18- to 34-year-olds participated in the study, first filling out questionnaires that, among other things, asked them about the friends they were in touch with weekly and monthly, reports the Guardian.

Then came the pain: The participants had to squat with their backs against a wall and their knees at right angles for as long as they could bear it.

The researchers' conclusion: "Pain tolerance is a significant predictor of an individual's social network size." And those with the largest number of friends in the "monthly contact" bucket showed the strongest pain tolerance, even when accounting for fitness, stress, and personality traits like one's agreeableness.

Researchers believe pain-blocking endorphins are behind the connection, and that there could be an evolutionary reason. "Being attached to other individuals is so important to our survival ... collaborating to find food," for instance, study author Katerina Johnson says.

So, Popular Science explains, it follows that "our bodies would want to reward us for good social interaction (and make us feel bad when we're not getting enough of it)." The researchers note it's possible that those who naturally have a higher pain threshold because of a more active endorphin system get more benefit from friendships and thus seek out more of them.

This article originally appeared on Newser: The Longer You Can Do This, the More Friends You May Have

More From Newser