It’s generally frowned upon to purposefully make someone feel bad, but new research suggests there may be some benefits to it.

In a study, published in the journal Psychological Science, researchers found that people may be looking to improve another person’s long-term well-being by inducing negative emotion in the present moment.

Read: Psychology Of Decision-Making: Why We Make Choices That Other People Will Approve Of

“We have shown that people can be 'cruel to be kind’--that is, they may decide to make someone feel worse if this emotion is beneficial for that other person, even if this does not entail any personal benefit for them,” study author Belén López-Pérez said in a statement. “These results expand our knowledge of the motivations underlying emotion regulation between people.”

Past research has showed people who emotionally manipulate others do it for their own personal benefit. But in a new study, researchers were interested in examining altruistic behavior. They imagined it happening in everyday scenarios. “For instance, inducing fear of failure in a loved one who is procrastinating instead of studying for an exam,” López-Pérez said.

The researchers hypothesized that the altruistic effect would happen when three conditions were met: the person making the other one feel bad has empathic concern for them; the negative emotion aids to help the target achieve their goal; and there’s no benefit for the person inducing the emotion.

To test this hypothesis, 140 adults played a computer-based video game with an anonymous partner called Player A. All of the participants received an automated note generated by Player A about their recent breakup and feelings of helplessness. Some of the study subjects were asked to empathize with Player A, while others were told to stay detached.

Read: Being Mean Causes Medical Errors; Why Nice People Get Better Patient Care Than Difficult Ones

They were then assigned to play one of two games. The first game, Soldier of Fortune, involved killing as many enemies as possible. The second game, Escape Dead Island, involved trying to escape from zombies. After playing the game, they listened to music and read game descriptions. They then rated, on a 1-7 scale, if they wanted their partner to listen to the clips or read the descriptions, which evoked various emotions. Additionally, they rated how they wanted their partner to feel and if it would be useful in achieving the game’s goal.

The findings revealed that study participants chose to induce specific emotions in their partner depending on which of the two games they played. For example, during the zombie game, players chose fearful music for their partner to listen to, in order to help them win the game.

“These findings shed light on social dynamics, helping us to understand, for instance, why we sometimes may try to make our loved ones feel bad if we perceive this emotion to be useful to achieve a goal,” López-Pérez said.

See also: Are You Naughty Or Nice? Personality Traits Linked To Genetics, Social Environment

Why Nice, Agreeable Women Make Less Money Than Men: Personality Type And Gender Pay Gap