How did alliances millitarism and nationalism lead to a crisis in Europe?

Militarism-countries wanted theirs to have the biggest armies so they competed with each other when one of them got a bigger military Nationalism-countries felt theirs was the best so they tried to be on top and outdo each other