Nationalism, imperialism and militarism had major roles in the war. Nationalism, for example, can allow countries to unite, and become strong. Nationalism is the belief that people's greatest loyalty should be to their nation, where they share a common history and culture.