By 1918, the Austro-Hungarian Empire was tearing itself apart under ethnic lines, and if the Dual Monarchy were to survive, it needed to withdraw from the war.
In the final stage of the Battle of Vittorio Veneto, a stalemate was reached, and the troops of Austria-Hungary started a chaotic withdrawal.
In the meantime, the Italians reached Trento and Udine, landed in Trieste, and aimed at making as many POWs as possible.
The armistice required Austria-Hungary's forces to evacuate not only all territory occupied since August 1914 but also South Tirol, Tarvisio, the Isonzo Valley, Gorizia, Trieste, Istria, western Carniola, and part of Dalmatia.
[4] After the war, Italy annexed Southern Tyrol (now Trentino-Alto Adige/Südtirol), according to the secret Treaty of London, as well as Trieste, Austrian Littoral and part of Dalmatia (Zadar, Lastovo, Palagruža).