National identity is dependent on several different factors: country of origin or residence; ethnic or religious affiliation; and notions of affinity with one's nationality. Nationality can be different than the identity one chooses for oneself in regard to a given nation or country. For instance, children of exiles may more readily identify with a non-native nation, the foreign country in which their parents were born, rather than their birthplace and place of citizenship.
National identity has its roots in loyalty to the tribe or family, but has at various points in history or in different regions been subsumed by affiliation with a religious denomination or political movement. Since the European Enlightenment, the idea is most often associated with the political nation-state and the loyalties it inspires in people.
The international political system is said to have its origins in the Peace of Westphalia in 1648, where a number of major European powers and their patronized principalities agreed upon the rights of respective sovereigns within designated boundaries to regulate the religious affiliations of its citizens. Previous and consequent demographic shifts consolidated certain religious loyalties. Threats from rivals also reinforced adherents' ties with their respective groups. As these borders became standard, an increasing sense of nationalism promoted revolutionary movements in Europe and began to define conglomerations of local ethnic groups as divisions of greater wholes. This thinking is said to have arisen especially after the French Revolution, because of the distinction Frenchmen received from it and because of a growing lower-class resentment of European elitism. In 1848, a series of popular revolutions swept through Europe in support of local causes, mostly quashed by the governing empires.
Nationalism rose to a peak when the volatile politics of the Balkans resulted in the 1914 Serbian assassination of Austro-Hungarian Archduke Franz Ferdinand, leading to a set of political maneuvers that created two bloc alliances juxtaposed to each other. Within a month, World War I commenced, culminating in an Anglo-French victory that hindered Austrian and German power and gave sovereignty to a number of new East European states. The financial burden placed on Germany gave credence to ultra-nationalists with racial ideologies, who made a distinction between Germans (and their assumed kin, Aryans in Central Asia) from other peoples, particularly Slavs and Semites. These overtones were pronounced in the subsequent Second World War, where German racial policy resulted in the extermination of millions of Jews and Slavs.
Following such dramatic violence, many Westerners have taken to viewing nationalism and over-identification with one's country as dangerous. However, the era of post-colonialism has seen many formerly subjected peoples explode into rivalries over resources and territory that has consolidated local identities perceived as threatened. The division of the British Mandate for Palestine and the Partition of India are prime examples of ethnic background predicating one's national identity. As a result, new states whose citizens have shared traumatic historical experienced have consolidated local identities and created abstract sets of symbols and collective histories. These two factors, among others, are seen by many scholars as key to the formation of distinct national identities.
Many persecuted ethnic groups, feeling disconnected from the dominant national identity around them, have responded by demanding their own countries. Nationalist movements have often culminated in independence, leading to a flowering of smaller independent states that has brought the so-called Peace of Westphalia under scrutiny. As certain ethnic groups are successful and others are not, the yet-to-be independent groups may see others' independence as an example to emulate. Instability also results in more narrow identities, where people may feel the need to identify with those close to them for protection. An example of this was the collapse of the Ottoman Empire, where Syria and Anatolia experienced convulsions of conflict between different groups.
Many identities are also said to be the result of artificial creation. Nation-states such as Syria and Iraq incorporate several different ethnic groups, the combination of whom has noticeably influenced internal strife in those countries where one group becomes more dominant over the others. As a result, isolated groups could be more disposed to form their own collective identities as opposed to the one prevalent among the elite. The advent of other political threats has led several smaller groups to unify their identities with one another's, exemplified in the consolidation of Palestinian identity in conflict with Zionist, then Israeli, communities.
National identity is often based on common characteristics, such as geography, language and values. Additionally, common religion and common history have been rallying points for the creation of common national identities. In Iraq, various governments attempted to generalize Islam and overlook the clashes between Sunni and Shiite adherents, hoping to inaugurate a common Iraqi identity. The Zionist movement sought to unify disparate Jewish communities, including via the inception of a modern dialect of the dormant everyday language of Hebrew. Anthony D. Smith has also identified attempts to promote pan-European myths that might aim to consolidate new Europe-wide institutions, which provides proof greater nationalities could also be created.