During the last years of the war, the country fell into a civil war-like state between the communists and nationalists. The communists defeated the last anti-communist forces in the south in 1944. Before the end of November, the main German troops had withdrawn from Tirana, and the communists took control by attacking it. The partisans entirely liberated the country from German occupation on 29 November 1944. A provisional government, which the communists had formed at Berat in October, administered Albania with Enver Hoxha as the head of government.