Nationalism helped some countries come together. It also tore older states apart.
Empires and kingdoms are often made up of different ethnic groups. Some groups started thinking about the old days, when they had ruled themselves or even had empires. They wanted to have their own nations again. They saw others kick out foreign rulers. They thought they could do the same. They could act on their feelings of nationalism. They could even form their own nation-states.
For example, many different groups of people lived on the Balkan Peninsula. That is an area in eastern and southeastern Europe. In the early 1800s, the Ottoman Empire ruled most of it. Nationalism helped make many groups want to be independent. The Greeks were among the first. They started fighting the Ottomans in 1821.