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 under Austrian rule. After the dissolution of the Austro-Hungarian Empire at the close of World War I, the Slovaks joined the Czechs to form Czechoslovakia. During the interwar period, Slovak nationalist leaders pushed for autonomy within Czechoslovakia, and in 1939 Slovakia became an independent state allied with Nazi Germany. Following World War II, Czechoslovakia was reconstituted and came under communist rule within Soviet-dominated Eastern Europe. In 1968, an invasion by Warsaw Pact troops ended the efforts of the country's leaders to liberalize communist rule and create "socialism with a human face," ushering in a period of repression known as "normalization." The peaceful "Velvet Revolution" swept the Communist Party from power at the end of 1989 and inaugurated a return to democratic rule and a market economy. On 1 January 1993, the country underwent a nonviolent "velvet divorce" into its two national components, Slovakia and the Czech Republic. Slovakia joined both NATO and the EU in the spring of 2004 and the euro zone on 1 January 2009.
Slovakia has made significant economic reforms since its separation from the Czech Republic in 1993. Reforms to the taxation, healthcare, pension, and social welfare systems helped Slovakia consolidate its budget and get on track to join the EU in 2004 after a period of relative stagnation in the early and mid 1990s and to adopt the euro in January 2009. Major privatizations are nearly complete, the banking sector is almost entirely in foreign hands, and the government has helped facilitate a foreign investment boom with business friendly policies. Slovakia's economic growth exceeded expectations in 2001-08 despite a general European slowdown. Foreign direct investment (FDI), especially in the automotive and electronic sectors, fueled much of the growth until 2008. Cheap and skilled labor, low taxes, no dividend taxes, a relatively liberal labor code, and a favorable geographical location are Slovakia's main advantages for foreign investors. The economy contracted 5% in 2009 primarily as a result of smaller inflows of FDI and reduced demand for Slovakia''s exports before rebounding in 2010-11, but growth slowed in 2012 due to weakening external demand. The government of Prime Minister Robert FICO in 2012 implemented tax increases on higher-earning individuals and corporations, effectively scrapping Slovakia''s flat tax to help meet budget deficit targets of 4.9% of GDP in 2012 and 3% of GDP in 2013.