After the First World War, together with Trieste and all Istria, the town was ceded to Italy. There were no particular events in those years, until Italy entered the Second World War in 1940. With the defeat of the Axis powers and the rise of Tito's rule, Piran was assigned to the Free Territory of Trieste, Zone B, under Yugoslavian administration. The town was annexed to Yugoslavia in 1954, according to the London Memorandum signed together with Italy. A significant part of Piran's population chose to emigrate to Italy or abroad in the final phase of the Istrian exodus, rather than stay in socialist Yugoslavia. The annexation to Yugoslavia was finally ratified with the Osimo Treaty in 1975, signed by Italy as well. Since 1991, Piran has been part of independent Slovenia.