The period of Nazi rule from the through the end of the Second World War brought significant territorial losses for the country. Nazi Germany initially expanded the country's territory dramatically and conquered most of Europe, though not all areas were added to Germany officially. The Nazis' fortunes changed after the failure of the invasion of Soviet Union. The Nazi regime eventually collapsed, and the Allies occupied Germany.