To prevent the 'mob mentality' from invading your brain while in a group, focusing on one's own personal moral standards could be the key.
Researchers have found that people may "lose touch" with their own morals and beliefs, and when in groups, were more likely to do things that they would normally believe are wrong.
"Although humans exhibit strong preferences for equity and moral prohibitions against harm in many contexts, people's priorities change when there is an 'us' and a 'them'," said Rebecca Saxe, associate professor of cognitive neuroscience at Massachusetts Institute of Technology (MIT).
For the study, researchers measured brain activity in medial prefrontal cortex, a part of the brain involved in thinking about oneself.
When someone is reflecting on himself or herself, this part of the brain lights up in functional magnetic resonance imaging (fMRI) brain scans.
They found that in some people, this activity was reduced when the subjects participated in a competition as part of a group, compared with when they competed as individuals.
Those people were more likely to harm their competitors than people who did not exhibit this decreased brain activity.
"Groups also promote anonymity, diminish personal responsibility and encourage reframing harmful actions as 'necessary for the greater good'," Mina Cikara, assistant professor at Carnegie Mellon University, noted.
The study appeared in the journal NeuroImage.