I once discussed the phenomenon that is exactly communities with adjoining territories, communities related to each other in other ways as well, who are engaged in constant feuds and in ridiculing each other — like the Spaniards and Portuguese, for instance, the North Germans and South Germans, the English and Scotch, and so on.
I gave this phenomenon the name of “the narcissism of minor differences”, a name which does not do much to explain it. We can now see that it is a convenient and relatively harmless satisfaction of the inclination to aggression, by means of which cohesion between the members of the community is made easier.
From: Sigmund Freud, Civilization and its Discontents, trans. and ed., James Strachey (New York: W. W. Norton, 1961), pp. 58-63