Slovakia's roots can be traced to the 9th century state of Great Moravia. Subsequently, the Slovaks became part of the Hungarian Kingdom, where they remained for the next 1,000 years. Following the formation of the dual Austro-Hungarian monarchy in 1867, language and education policies favoring the use of Hungarian (Magyarization) resulted in a strengthening of Slovak nationalism and a cultivation of cultural ties with the closely related Czechs, who were themselves ruled by the Austrians. After the dissolution of the Austro-Hungarian Empire at the close of World War I, the Slovaks joined the Czechs to form Czechoslovakia. Following the chaos of World War II, Czechoslovakia became a Communist nation within Soviet-dominated Eastern Europe. Soviet influence collapsed in 1989 and Czechoslovakia once more became free. The Slovaks and the Czechs agreed to separate peacefully on 1 January 1993. Slovakia joined both NATO and the EU in the spring of 2004 and the euro area on 1 January 2009.