Characteristic group behaviour includes a sense of belonging to one’s own group – and being different from, and perhaps in opposition to, other groups. Claire Alexander describes group cohesion in her book Asian Gangs, for example:
“A crucial element in the creation and maintenance of peer group boundaries is their oppositional nature. This was manifested in two distinct, though connected, ways: firstly in the imposition of a collective, [usually stigmatised], identity from outside; and secondly through the formulation of notions of inclusion and exclusion from [the young men] themselves. This latter categorisation was posited on a dual assertion of internal loyalty and of external difference – and especially of potential threat. These perceptions were centred on a complex and shifting matrix of alliances and antagonisms around notions of community, territory, age and personality, but they were also crucial to a sense of individual and collective security. It is this sense, of belonging, of vulnerability, of care and responsibility – of trust – which provides a link between the group and its wider environs, between the assumption and ascription of group identity.” 
The brackets have been added here because they enclose words which were particular to the context she was writing about; if one removes those words, the quotation is applicable to any ethnic group.
Ethnic identity would not normally be how people choose to define themselves in their relationships with others. People see each other as neighbours, colleagues, friends, and in some cases as team-mates in sporting contests – irrespective of ethnicity. When a particular ethnic group is stigmatised, though, its members are more likely to huddle together and to see people outside the group as potentially hostile.
© PatternsofPower.org, 2014
 Claire Alexander describes group cohesion in her book The Asian Gang, pages 157-8.