Slavic tribes occupied what is now Slovakia in the 5th century AD. In 833, the prince of Moravia captured Nitra and formed the Great Moravian Empire, which included all of present Central and West Slovakia, the Czech Republic and parts of neighbouring Poland, Hungary and Germany. The empire converted to Christianity with the arrival of the Thessaloniki brothers and missionaries, Cyril and Methodius, in 863.
In 907, the Great Moravian Empire collapsed as a result of the political intrigues of its rulers and invasion by Hungary. By 1018 the whole of Slovakia was annexed by Hungary and remained so for the next 900 years, although the Spis region of East Slovakia belonged to Poland from 1412 to 1772. After a Tatar invasion in the 13th century, the Hungarian king invited Saxon Germans to settle the depopulated north-eastern borderlands. When the Turks overran Hungary in the early 16th century, the Hungarian capital moved from Buda to Bratislava. Only in 1686 was the Ottoman presence finally driven south of the Danube.
The formation of the dual Austro-Hungarian monarchy in 1867 gave Hungary autonomy in domestic matters and a policy of enforced Magyarisation ('Hungarianisation') was instituted in Slovakia between 1868 and 1918. In 1907 Hungarian became the sole language of elementary education. As a reaction to this, Slovak intellectuals cultivated closer cultural ties with the Czechs, who were themselves dominated by the Austrians. The concept of a single Czecho-Slovakian unit was born for political purposes and, after the Austro-Hungarian defeat in WWI, Slovakia, Ruthenia, Bohemia and Moravia united as Czechoslovakia. The centralising tendencies of the sophisticated Czechs alienated many Slovaks and, after the 1938 Munich agreement that forced Czechoslovakia to cede territory to Germany, Slovakia declared its autonomy within a federal state. The day before Hitler's troops invaded Czech lands in March 1939, a clero-fascist puppet state headed by Monsignor Jozef Tiso (executed in 1947 as a war criminal) was set up, and Slovakia became a German ally.
In August 1944, Slovak partisans commenced the Slovak National Uprising which took the Germans several months to crush. In the wake of Soviet advances in early 1945, a Czechoslovak government was established at Kosice two months before the liberation of Prague. The second Czechoslovakia established after the war was to have been a federal state, but after the communist takeover in February 1948 the administration once again became centralised in Prague. Many of those who resisted the new communist dictatorship were ruthlessly eliminated by execution, torture and starvation in labour camps. Although the 1960 constitution granted Czechs and Slovaks equal rights, only the 1968 'Prague Spring' reforms introduced by Alexander Dubcek (a rehabilitated Slovak communist) implemented this concept. In August 1968, Soviet troops quashed democratic reform, and although the Czech and Slovak republics theoretically became equal partners, the real power remained in Prague.
The fall of communism in Czechoslovakia during 1989 led to a resurgence of Slovak nationalism and agitation for Slovak autonomy. After the left-leaning nationalist Vladimir Meciar was elected in June 1992, the Slovak parliament voted to declare sovereignty and the federation dissolved peacefully on 1 January 1993. Meciar lost the prime ministership in a parliamentary vote of no-confidence in March 1994 because of a failing economy and his increasingly authoritarian rule, but after general elections a few months later, he was able to form a new coalition government.
Immediately after the elections, Meciar cancelled the sale of state-owned enterprises, halted Slovakia's privatisation scheme and threatened independent radio stations and newspapers with legal action if they dared criticise the government. Not surprisingly, many Slovaks started to lose patience with Meciar's heavy-handed rule. The passing of anti-democratic laws brought criticism from various human rights organisations, European leaders and US President Clinton.
The elections of 1998 saw Meciar ousted by the reform-minded Mikulés Dzurinda, leader of the right-leaning Slovak Democratic Coalition (SDK). He has had a rough time as prime minister, dogged by poor economic performance, high unemployment and ethnic tensions with the country's Hungarian and Roma minorities, while trying to hold together his fragile coalition.
Nevertheless, Dzurinda has managed to put Slovakia back on track to join the rest of Europe, having opened negotiations with the EU in February 2000. Opinion polls at the time showed that 70% of Slovaks supported their country's bid to join the EU, and for the first time there was also a majority - albeit a slender one - in favour of joining NATO.