Nationalism is an idea and movement that holds that the nation should be congruent with the state. As a movement, nationalism tends to promote the interests of a particular nation (as in a group of people), especially with the aim of gaining and maintaining the nation's sovereignty (self-governance) over its homeland to create a nation state. Nationalism holds that each nation should govern itself, free from outside interference (self-determination), that a nation is a natural and ideal basis for a polity, and that the nation is the only rightful source of political power. It further aims to build and maintain a single national identity, based on shared social characteristics of culture, ethnicity, geographic location, language, politics (or the government), religion, traditions and belief in a shared singular history, and to promote national unity or solidarity. Nationalism, therefore, seeks to preserve and foster a nation's traditional culture. There are various definitions of a "nation", which leads to different types of nationalism. The two main divergent forms are ethnic nationalism and civic nationalism.
Nationalism developed at the end of the 18th century, particularly with the French Revolution and the spread of the principle of popular sovereignty (the idea that "the people" should rule). Three main theories have been used to explain its emergence. Primordialism (perennialism) developed alongside nationalism during the romantic era and held that there have always been nations. This view has since been rejected by scholars, who agree that nations are socially constructed and historically contingent. Modernization theory, currently the most commonly accepted theory of nationalism, adopts a constructivist approach and proposes that nationalism emerged due to processes of modernization, such as industrialization, urbanization, and mass education, which made national consciousness possible. Proponents of this theory describe nations as "imagined communities" and nationalism as an "invented tradition" in which shared sentiment provides a form of collective identity and binds individuals together in political solidarity. A third theory, ethnosymbolism explains nationalism as a product of symbols, myths and traditions, as is associated with the work of Anthony D. Smith. Additionally, the spread of nationalist movements during decolonization has led many theorists to examine the role of elites in mobilizing communities in order to maintain their power.
The moral value of nationalism, the relationship between nationalism and patriotism, and the compatibility of nationalism and cosmopolitanism are all subjects of philosophical debate. Nationalism can be combined with diverse political goals and ideologies such as conservatism (national conservatism and right-wing populism) or socialism (left-wing nationalism). In practice, nationalism is seen as positive or negative depending on its ideology and outcomes. Nationalism has been a feature of movements for freedom and justice, has been associated with cultural revivals, and encourages pride in national achievements. It has also been used to legitimize racial, ethnic, and religious divisions, suppress or attack minorities, and undermine human rights and democratic traditions. Radical nationalism combined with racial hatred was a key factor in the Holocaust perpetrated by Nazi Germany.