There’s a reason why being kind to others is good for you — and it can now be traced to a specific nerve.

When it comes to staying healthy, both physically and mentally, studies consistently show that strong relationships are at least as important as avoiding smoking and obesity. But how does social support translate into physical benefits such as lower blood pressure, healthier weights and other physiological measures of sound health? A new study published in Psychological Science suggests that the link may follow the twisting path of the vagus nerve, which connects social contact to the positive emotions that can flow from interactions.

The researchers, led by Barbara Fredrickson, professor of psychology at the University of North Carolina, Chapel Hill, recruited 65 members of the university’s faculty and staff for a study on meditation and stress. Roughly half were randomly assigned to take an hour-long class each week for six weeks in “lovingkindness” meditation, which involves focusing on warm, compassionate thoughts about yourself and others.

In the class, the participants were instructed to sit and think compassionately about others by starting to contemplate their own worries and concerns and then moving out to include those of more of their social contacts. People were taught to silently repeat phrases like “May you feel safe, may you feel happy, may you feel healthy, may you live with ease,” and keep returning to these thoughts when their minds wandered. They were also advised to focus on these thoughts, and on other people, in stressful situations like when they were stuck in traffic. “It’s kind of softening your own heart to be more open to others,” says Fredrickson.

The group not assigned to the meditation class was placed on a waiting list for a future class. For 61 days, all the participants logged their daily amount of meditation and prayer (those in the class were encouraged to practice every day) as well as their most powerful experiences of positive and negative emotions. They were also tested before starting the six-week class and again after completing it on their heart-rate variability, which is a measure of how “toned,” or responsive, the vagus can be.

The vagus regulates how efficiently heart rate changes with breathing and, in general, the greater its tone, the higher the heart-rate variability and the lower the risk for cardiovascular disease and other major killers. It may also play a role in regulating glucose levels and immune responses.

In addition, and relevant to the study, the vagus is intimately tied to how we connect with one another — it links directly to nerves that tune our ears to human speech, coordinate eye contact and regulate emotional expressions. It influences the release of oxytocin, a hormone that is important in social bonding. Studies have found that higher vagal tone is associated with greater closeness to others and more altruistic behavior.

More of the meditators than those on the waiting list showed an overall increase in positive emotions, like joy, interest, amusement, serenity and hope after completing the class. And these emotional and psychological changes were correlated with a greater sense of connectedness to others — as well as to an improvement in vagal function as seen in heart-rate variability, particularly for those whose vagal tone was already high at the start of the study.

“The biggest news is that we’re able to change something physical about people’s health by increasing their daily diet of positive emotion, and that helps us get at a long-standing mystery of how our emotional and social experience affects our physical health,” says Fredrickson.

Simply meditating, however, didn’t always result in a more toned vagus nerve. The change only occurred in meditators who became happier and felt more socially connected; for those who meditated just as much but didn’t report feeling any closer to others, there was no change in the tone of the vagal nerve. “We find that the active ingredients are two psychological variables: positive emotion and the feeling of positive social connection,” she says. “If the practice of lovingkindness didn’t budge those, it didn’t change vagal tone.”

More research is needed to determine how large these changes can be and if they can be sustained, as well as how the feelings of social connectedness interact with compassionate meditation. But, Fredrickson says, “We’ve had a lot of indirect clues that relationships are healing. What’s exciting about this study is that it suggests that every [positive] interaction we have with people is a miniature health tune-up.” Being a good friend, and being compassionate toward others, may be one of the best ways to improve your own health.