Czechoslovakia was a landlocked state in Central Europe, created in 1918, when it declared its independence from Austria-Hungary. In 1938, after the Munich Agreement, the Sudetenland became part of Nazi Germany, while the country lost further territories to Hungary and Poland. Between 1939 and 1945, the state ceased to exist, as Slovakia proclaimed its independence and Carpathian Ruthenia became part of Hungary, while in the remainder of the Czech Lands, the German Protectorate of Bohemia and Moravia was proclaimed. In 1939, after the outbreak of World War II, former Czechoslovak President Edvard Beneลก formed a government-in-exile and sought recognition from the Allies.