Italy entered World War I only in 1915, after a typical phase of diplomatic oscillation.
Austria-Hungary had been the arch-enemy of Italy since the Wars of Independence, however the two country were supposed to be allied since Italy had recently quarreled with France over the colonization of Tunisia.
The public was understandably outraged, and the Government first declared its neutrality and then a state of war with the Central Empires.
The war, fought mainly on the Alps, was an inglorious and bloody affair, with thousands of soldiers sent by incompetent generals to die against well fortified positions only to be ordered to retreat after finally conquering them. The survivors were often killed by the Military Police pursuant to brutal martial laws based on the collective responsibility of rebellious or simply retreating units.
The scenario suddenly changed in 1917 when a resurgent Austria-Hungary, galvanized by the Russian surrender and German reinforcements, looked poised to invade the whole Northern country just like under the Austrian Empire. The war moved to the plains, the General Staff finally acknowledged at least in part its mistakes and the soldiers suddenly realized what was at stake. A show of heroic resistance along the Piave river prevented total collapse, allowing Italy to see victory and the dissolution of the hated Dual Monarchy of Vienna.
The revenge could perhaps heal everything, but the Versailles Peace Treaty proved disappointing for Italy nearly as it was for Germany. The Italian Government got virtually nothing. This, coupled with the gross mismanagement of the war effort, stripped the Italian Institutions of every prestige and legitimacy.
Leftist armed squads began to dominate the streets. In reaction, the more conservative-minded war veterans created rightist “action squads”: Italy, until that time a relatively moderate country, had just invented fascism. What was left of the traditional order, terrified by the prospect of a Communist takeover, supported the fascist faction. A dictatorship would soon follow.