The research, published in the Journal of Experimental Psychology, found that mindfulness training inspired people to be kinder and more empathetic to a stranger who had been ostracized during a simulated online scenario.

“When people witness someone being victimized, it’s really common for us to get distressed by it,” says study author Daniel Berry, an assistant professor of psychology at California State University San Marcos. But that distress doesn’t always translate into empathy. “Sometimes that upset is displaced so that we’re not feeling upset for the other person; we’re just feeling negatively,” Berry explains. “When that happens, people actually tend to turn away from the person in need.”

In the study, “the folks who received mindfulness instruction seem to be better at regulating their emotions…allowing them to be present for the strangers they were witnessing being victimized.”

The study consisted of four experiments, each with roughly 100-150 people enrolled. In most experiments, about half of the group was led through an audio-recorded guided meditation meant to help them stay present, while the others either received no training or an attention-focused audio training. Next, people played a computer game in which four characters, including one controlled by the person in the study, tossed balls back and forth. Study participants were told that each character was controlled by a person — but in reality, all of the other characters were automated.

In the first phase of the game, the computer was programmed to exclude one player after they received two tosses, leaving them to stand by and watch as the others played out the rest of the round. The goal of the study, Berry explains, was to see how people responded to the exclusion of a stranger, and to determine whether mindfulness changed their reactions in any way.

The researchers observed marked increases in empathetic behavior among players who did mindfulness training before beginning the game, compared to people who did attention training or no training at all, Berry says. While everyone in the study was able to identify the ostracized character, players who had undergone mindfulness training showed more concern for that person and were more likely to compensate for their exclusion with extra tosses during the next round, or with kind words in a post-game follow-up email.

“All four studies seemed to converge to suggest that they felt concern for the person in need, rather than feeling outraged at the people who were perpetrating the victimization,” Berry says. “They weren’t feeling negatively for themselves. They were specifically concerned for the other person, and this was specific to the mindfulness condition.”

While the findings can’t be extrapolated beyond online scenarios, Berry says past research has shown that mindfulness can increase kindness during in-person interactions as well. Why the practice is so powerful isn’t totally clear, but Berry says it may have something to do with how it “starkly contrasts our everyday ways of thinking, feeling and behaving.”

“Most of the time, we operate on automatic pilot without much awareness of what we are doing, why we are doing it or how our thoughts, feelings and other external stimuli are influencing our behavior,” Berry says. “I think training in mindfulness can break us from this automatic way of thinking about others and widen our circles for whom we show kindness.”