When the war in Europe ended in May 1945, much of Germany was in ruins and it had no functioning government. The victorious Allies needed to establish a system to govern Germany and rebuild the nation. The Allies had thought ahead to the end of the war and had begun to plan for Germany's future even before fighting ceased. At the Potsdam Conference, they agreed on several major issues. First, the Allies agreed to temporarily divide Germany into four zones of occupation. The Soviet Union would control about one-third of the country. The remaining two-thirds would be divided into three zones, to be controlled by the United States, France, and Great Britain. Second, the Allies also divided the German capital, Berlin. Though this city lay deep within the Soviet-controlled region of Germany, it was divided into four zones of occupation. Third, the Allies worked together to establish a plan to rid Germany of any remnants of the Nazi Party and Nazi beliefs, in part by bringing former Nazi and military leaders to justice for crimes committed during the war. First, the Allies agreed to temporarily divide Germany into four zones of occupation. The Soviet Union would control about one-third of the country. The remaining two-thirds would be divided into three zones, to be controlled by the United States, France, and Great Britain. Second, the Allies also divided the German capital, Berlin. Though this city lay deep within the Soviet-controlled region of Germany, it was divided into four zones of occupation. Third, the Allies worked together to establish a plan to rid Germany of any remnants of the Nazi Party and Nazi beliefs, in part by bringing former Nazi and military leaders to justice for crimes committed during the war.