When Austria-Hungary declared war on Serbia, other European countries joined in to fight because of...causing a world war instead of a conflict between two nations:

1. Alliances: As part of various alliances and treaties, countries such as Germany and Russia were drawn into the conflict to support their allies.

2. Nationalism: The rise of nationalism in the late 19th and early 20th centuries fueled tensions between countries and created a sense of national pride and competition that contributed to the broader conflict.

3. Imperialism: The competition for colonies and resources around the world heightened rivalries and tensions between European powers, ultimately feeding into the outbreak of World War I.

4. Militarism: The arms race and buildup of military forces in Europe in the years leading up to the war heightened the likelihood of conflict and made it difficult for countries to step back from the brink of war.

5. Balkan instability: The Balkan region was already a hotbed of ethnic and political tensions, and the assassination of Archduke Franz Ferdinand of Austria-Hungary provided the spark that set off a larger conflict involving multiple European powers.