The royal government remained in control of the south and declared war on Germany; the military forces it still controlled joined the Allies in a position of co-belligerence. It was eventually re-established as the government of all of Italy shortly before the end of the war in the spring of 1945, when partisan uprisings liberated northern Italy. Italy would become a member of NATO after the war, but lost the region of Istria and the Dalmatian city of Zadar to Yugoslavia, and all its colonies excluding Somalia.