The Austro-Hungarian Empire collapsed in 1918 with the end of World War I. The First Austrian Republic was established in 1919. In the 1938 Anschluss, Austria was occupied and annexed by Nazi Germany. This lasted until the end of World War II in 1945, after which Austria was occupied by the Allies and its former democratic constitution was restored. In 1955, the Austrian State Treaty re-established Austria as a sovereign state, ending the occupation. In the same year, the Austrian Parliament created the Declaration of Neutrality which declared that the country would become permanently neutral.