While ethnicity and race are related concepts, the concept of ethnicity is rooted in the idea of societal groups, marked especially by shared nationality, tribal afilliation, religious faith, shared language, or cultural or traditional origins and backgrounds. Whereas race is rooted in the idea of biological classification of homo sapiens to subspecies according to morphological features such as skin color or facial characteristics. "Ethnicity" is sometimes used as a euphemism for "race".
It is a term also used to justify real or imagined historic ties as well. Ethnicity goes far beyond the modern ties of a person to a particular nation (e.g., citizenship), and focuses more upon the connection to a perceived shared past and culture. See also Romanticism, folklore.
The 19th century saw the development of the political ideology of ethnic nationalism, when the concept of race was tied to nationalism first by German theorists, including Johann Gottfried von Herder. The cases where a focus on ethnic ties to the exclusion of history or historical context has arguably resulted in an almost fanatical self-justifying nationalist and or imperialist goal.
An example of this is the expansion of the German Empire and the Third Reich, based on the theory that these governments were only re-possessing lands that had "always" been German, and the current struggle in the Balkans.
The term "ethnicity" may also be used to refer to a particular ethnic group: "People of various ethnicities."