Research suggests exercise is good for our mental health—perhaps even more so if we’re highly social.

The idea of the fabled runner’s high has spurred a considerable amount of research into the mental and emotional benefits of exercise. Much of this research has focused on single individuals, as if exercise was always a solitary activity.

But researchers Nicole Van Kim and Toben Nelson recognized a disconnect between that research and what happens in the real world—namely that exercise is often a social activity, not just through team sports but through biking, running clubs, and even in the way people regularly jog or bike with a buddy. How does this social dimension affect our health?

To address this question, Van Kim and Nelson analyzed survey data from more than 14,700 college students nationwide, gauging their level of physical activity, mental health, perceived level of stress, and social activity.

“…students who got vigorous physical activity three days or more per week reported better mental health and felt less stressed than other students…”

Consistent with previous research, Van Kim and Nelson found that students who got vigorous physical activity three days or more per week reported better mental health and felt less stressed than other students (with “vigorous” exercise being that which produces hard breathing or sweat for at least 20 minutes).

What’s more, they found that “highly social” students—those who have at least five close friends and spend two or more hours per day socializing—were more likely to partake in vigorous physical activity.

In fact, further analysis revealed a deeper connection between these findings: Highly social students were more likely to reap the mental health benefits of exercise than other students who worked out vigorously. Why might this be? The results, published in the latest issue of the American Journal of Health Promotion, suggest that social students generally enjoyed lower stress than other students, which might have helped them profit more from their exercise.

While this study echoes prior findings backing the psychological benefits of exercise, it also suggests that these benefits can be explained, at least in part, by social factors. The study doesn’t prove that social activity causes better mental health from exercise among college students, but it does imply a strong relationship. As a result, Van Kim says she believes college campuses should consider steps to change their social as well as physical environments to encourage exercising—for instance, by advertising intramural sports more heavily.

“Over half [of college students] don’t even meet the vigorous physical activity guidelines,” she says. “I think adding in a social component can help turn that around.”

This story originally appeared on Greater Good, the online magazine of the Greater Good Science Center at UC Berkeley. For more, visit Greater Good online.