The Protestant Reformation was certainly fueled in some part by feelings of nationalism (identifying one’s self as a particular people group known for it’s language, religion, and other geographical and cultural distinctions). The new nationalistic feelings of the German-speaking people, or the English, or Dutch, or Poles propelled them to independence movements (and great conflict) for the next 100 years (and more).
The horrific Thirty Years War (1618-1648) was indeed a religious war, but more than that. On the surface many would see it as a war between Protestants and Catholics. However, the Catholic king of France was allied with the Protestant kingdom of Sweden, the Protestant Dutch, and Protestant German states….in their war against Catholic Spain, the Catholic Holy Roman Empire, and for a time the Protestant Kingdom of Denmark-Norway. It was truly a confusing series of political-religious alliances that in the end killed off anywhere between 4 and 8 million people. Europe was devastated, decimated, and exhausted after 30 years.
In 1648 the Peace of Westphalia was signed. This treaty basically re-drew the map of Europe. We can pretty much see the modern map of Europe today in the map drawn at Westphalia. The treaty guaranteed the independence of the Dutch Republic from Spain. It recognized the independence of Switzerland from the Holy Roman Empire. Religious toleration…while not as full blown as it is today, was accepted in the Dutch Republic, and throughout Europe Catholic states and Protestant states were recognized as equals. And no one would be forced to follow the conversion of their ruler.
Each government within each nation was sovereign, with clearly drawn borders that would be defended. Each Nation-State could set its own course with its own government.
Over 200 years later other nation-states, born out of nationalistic fervor, would be born: Germany and Italy most notably.
By the end of World War 2, Europe and the Western Hemisphere were populated with nation-states, and in Asia we saw China and Japan as independent countries, but the rest of the world was still either a colony or just barely inhabited. Another 30 years would go by until we reach the current total of 195 nations in the world today.