Nationalism was historically the reaction against imperialism. Some empires transformed into nation states, such as Great Britain. Most countries who are independent today are independent because of nationalistic movements against imperialism and colonisation.