Not to be confused with patriotism.
Nationalism is an ideology which emphasises the distinctiveness of a nation and usually points to its statehood. Nationalist movements arose with the development of capitalism and the state. In the nineteenth century, Karl Marx supported some nationalist movements because they were historically progressive in that they served the class interests of the rising bourgeoisie in its struggle against the traditional aristocracy. In the twentieth century, nationalism was, and still is, associated with movements for self-determination and ethnic cleansing.
Marxists generally do not support nationalist movements. Certainly communism will allow the fullest linguistic and cultural diversity, but this cannot be achieved through nationalism. Marxism explains how workers are exploited and unfree, not as particular nationalities, but as members of a class. To be in an oppressed minority at all it is usually necessary to first belong to the working class. From this perspective, identifying with the working class provides a rational basis for political action. The objective is a stateless world community of free access. Given that nationalism does nothing to further this understanding, however, it is an obstruction to world socialism.
Nationalism in a strong or imperialist country such as Great Britain, Germany, Japan, or the United States generally supports continued domination or an attempt to dominate, sometimes on a global basis. Such nationalism is a cause of great wars such as World War II. Nationalism in a socialist country such as the Soviet Union is a stumbling block making fulfillment of internationalist principles more difficult. In oppressed colonial countries such as Vietnam nationalists were often part of coalitions fighting for national independence.