What are the origins and characteristics of nationalism?

First, what are the origins and characteristics of nationalism? Why did nationalism pose an unusually difficult problem for the Austrian, Prussian, and Russian empires? What role did romanticism and liberalism play in the development of nationalism?