How did nationalism both unify and divide nations? (2 short sentences)

Nationalism unified nations by promoting a sense of shared identity and pride among citizens, but it also divided nations by creating conflicts with other groups or nations who may have different national identities.