The area now constituting Slovakia was settled by Slavic tribes in the 5th–6th cent. A.D. In the 9th cent. Slovakia formed part of the great empire of Moravia, under whose rulers Christianity was introduced by Saints Cyril and Methodius. From the Magyar conquest of Slovakia early in the 10th cent. until 1918, Slovakia was generally under Hungarian rule. German and Jewish settlements in Slovakian cities date from the Middle Ages; most of the Slovaks remained peasants in the countryside, although some became burghers. Czech-Slovak contacts, broken after the demise of the Moravian empire, were restored by the 14th cent.; and the 15th-century Hussite movement in Bohemia enjoyed influence in Slovakia.
After the Ottoman Turkish victory at Mohács in 1526 over Louis II of Hungary and Bohemia, Slovakia, along with western Hungary, fell under Hapsburg rule. It thus escaped Turkish domination but became a stronghold of the great Hungarian nobles, who owned most of the land and treated the Slovaks with contempt. Slovakia, however, played an important political role, with Bratislava serving as the Hapsburg capital, until all of Hungary was finally freed from the Turks in the late 17th cent. Slovakia also enjoyed more religious toleration than much of the Hapsburg empire, and Protestantism thrived.
In the 18th cent. Maria Theresa and Joseph II pursued religious freedom and social reform in Slovakia but greatly intensified Germanization. This policy spurred a Slovak national revival, which grew steadily in the 19th cent. The Catholic clergy, which constituted the only sizable body of Slovak intellectuals, exercised the main leadership of the nationalist movement. L'udovít Štúr became the father of the modern Slovak literary language. During the anti-Hapsburg revolutions of 1848, Štúr joined Czech representatives in a Pan-Slav congress at Prague. Also in 1848, the Slovaks formulated a set of demands for increased political and linguistic rights.
Some clashes between Slovaks and Hungarians occurred, and Magyarization lessened temporarily; but after the Ausgleich establishing the dual Austro-Hungarian Monarchy in 1867, Magyarization again intensified, thus further heightening Slovak nationalism. Large-scale immigration (1900–1910) of the landless Slovak peasants to America gave the Slovak independence movement considerable support in the United States during World War I, during which the Slovaks and other nationalities of the Hapsburg empire agitated for freedom.
The so-called Pittsburgh Declaration, signed by Czech and Slovak patriots in May, 1918, provided for a united Czechoslovak republic, in which Slovakia would retain broad autonomy, with its own governmental institutions and official language. On Oct. 30 the Slovak National Council formally proclaimed independence from Hungary and incorporation into Czechoslovakia. The new republic's boundaries, established in 1920 by the Treaty of Trianon, encompassed areas where more than one million Hungarians lived. Hungary, meanwhile, continued to claim at least part of Slovakia, while a large Slovak People's party, led by Monsignor Andrej Hlinka, accused the Czechoslovak government of denying Slovakia the autonomous rights promised. Indeed, from 1918 until 1938, Slovakia held the status of a simple province, although the Slovak language was official within its boundaries.
The minority problem was complicated by religion: the majority of Slovaks were Catholic, while the Prague government was distinctly anticlerical. Monsignor Hlinka and his successor as leader of the Slovak People's party, Father Jozef Tiso, demanded full autonomy for Slovakia on a basis of complete equality for both Czechs and Slovaks. After the Munich Pact of 1938, Slovakia became an autonomous state within reorganized Czecho-Slovakia, with Father Tiso as Slovak premier. At the same time a large part of S Slovakia was ceded to Hungary and some northern districts to Poland. When the Prague government dismissed (Mar., 1939) Tiso as premier, he appealed to Adolf Hitler, who used this appeal as a pretext for making Bohemia, Moravia, and Silesia a German protectorate.
Slovakia became a nominally independent state under German protection and Tiso's one-party rule. Tiso allowed German troops to occupy Slovakia in Aug., 1939, and entered World War II as Germany's ally. A Slovak underground movement gained strength, however, and powerfully aided the Soviet troops who drove the Germans out of Slovakia late in 1944. The Allied victory in 1945 restored Slovakia to its territorial status before the Munich Pact, and the constitution of 1948 recognized Slovakia as one of the constituent states of a reestablished Czechoslovakia; the other state was composed of Bohemia, Moravia, and a small part of Silesia. The constitution also established separate government organs for Slovakia.
The accession in 1948 of a Communist government in Czechoslovakia revived the old antagonism between Czechs and Slovaks. The Catholic clergy in Slovakia, militantly opposed to Communism, was persecuted, and the Slovak government came entirely under the control of the Czechoslovak Communist party, which began to transfer authority from Bratislava to Prague. In 1960 a new constitution seriously curtailed Slovakia's autonomy. The liberal Communist regime of Alexander Dubček, which came into power in 1967, responded to Slovak discontent by promising federalization of Czechoslovakia.
Despite the invasion (1968) of Czechoslovakia by the Soviet Union, the new Socialist Federal Republic came into being on Jan. 1, 1969; the constituent Czech and Slovak republics received autonomy over local affairs, with the federal government responsible for foreign relations, defense, and finance. The fall of the Communist regime at the end of 1989 revived Slovakia's drive for autonomy. Dissatisfied with their minority status in the federal government, many Slovaks called for a loose confederation of the Czech and Slovak Republics, while others advocated complete independence.
In 1992, as free-market reforms brought on economic problems and widespread dissatisfaction, nationalists led by Slovak premier Vladimír Mečiar came to power. A constitution for an independent Slovakia was approved and on Jan. 1, 1993, the country became independent. An inefficient and obsolete industrial base, rising inflation, and high unemployment were among the problems facing the republic. Mečiar was ousted in Mar., 1994, and Jozef Moravčík became prime minister. Following elections in Oct., 1994, Mečiar returned to power at the head of a coalition government.
A continuing stalemate between Mečiar and Slovakian president Michal Kováč hindered Slovakian efforts to win credibility abroad and join the Western community. The Mečiar government was criticized for its handling of the privatization of state-owned businesses and for its backing of controversial legislation, including a law making Slovak the sole official language. Slovakia's inefficient, defense-oriented industrial base contracted, and the country did not receive needed foreign investment. When Kováč's term was up in Mar., 1998, a divided parliament was unable to appoint a successor; the constitution was amended to allow for direct election of the president.
The Mečiar government was defeated in Sept., 1998, by a four-party center-right coalition, and Mikuláš Dzurinda became prime minister. Mečiar ran for president in 1999, but was defeated by Rudolf Schuster, who pledged to steer a more pro-European course. Dzurinda's government overhauled the tax and social welfare systems and worked to attract foreign investment; the economy subsequently experienced significant growth. Dzurinda's coalition retained power after the 2002 parliamentary elections.
Slovakia became a member of NATO in Mar., 2004, and of the European Union in May. In April, Ivan Gašparovič was elected as Schuster's successor. Mečiar again mounted a campaign for the presidency and won the first round of voting, but he was soundly defeated in the runoff. In the June, 2006, parliamentary elections the leftist party Smer [direction], led by Róbert Fico, won the largest number of seats, and the following month Fico became prime minister of a coalition government that included Mečiar's party and the right-wing Nationalist party. President Gašparovič was returned to office in Apr., 2009, following a runoff election.
The June, 2010, parliamentary elections resulted in an increase to Smer's share of the vote, but a coalition of conservative parties secured a majority of the seats and formed a government. Iveta Radičová became prime minister; she was the first woman to hold the post. Coalition divisions over the eurozone rescue fund led to the fall of the government in Oct., 2011 (though the rescue was then approved with opposition support). Early elections were called for Mar., 2012; Smer won a majority of the seats, and Fico again became prime minister.