A new study by University of Edinburgh researchers says that how well a person performs in a group may be hereditary.
They found that strong genetic influences have a major influence on how loyal a person feels to their social group.
Scientists asked sets of twins a series of questions about how important it was for them that people with whom they are affiliated share their religion, ethnicity or race.
They found that identical twins - who share all their genes - gave very similar responses, whereas non-identical twins were much more likely to differ in their answers.
"The success of a coalition reflects the genetic make-up of the group members as well as cultural factors such as and shared goals, beliefs, and traditions," said Professor Timothy Bates, of the University of Edinburgh's School of Philosophy, Psychology and Language Sciences.
"This research could be applied to investigate affiliation in areas such as work, sport and the military," he added.
The study is published in Psychological Science journal.