Slovakia, officially the Slovak Republic, is a landlocked country in Central Europe. It is bordered by Poland to the north, Ukraine to the east, Hungary to the south, Austria to the west, and the Czech Republic to the northwest. Slovakia's mostly mountainous territory spans about 49,000 km2 (19,000 sq mi), hosting a population exceeding 5.4 million. The capital and largest city is Bratislava, while the second largest city is Košice.
The Slavs arrived in the territory of the present-day Slovakia in the 5th and 6th centuries. From the late 6th century, parts of modern Slovakia were incorporated into the Avar Khaganate. In the 7th century, the Slavs played a significant role in the creation of Samo's Empire. When the Avar Khaganate dissolved in the 9th century, the Slavs established the Principality of Nitra before it was annexed by the Principality of Moravia, which later became Great Moravia. When Great Moravia fell in the 10th century, the territory was integrated into the Principality of Hungary at the end of the 9th century, which later became the Kingdom of Hungary in 1000. In 1241 and 1242, after the Mongol invasion of Europe, much of the territory was destroyed, but was recovered largely thanks to Hungarian king Béla IV. During the 16th and 17th centuries, southern portions of present-day Slovakia were incorporated into provinces of the Ottoman Empire. The Ottoman-controlled areas were ceded to the Habsburgs by the turn of the 18th century. The Hungarian declaration of independence in 1848 was followed in the same year by the Slovak Uprising through the establishment of the Slovak National Council. While the uprising did not achieve its aim, it played an important role in cementing a Slovak national identity. The Hungarian wars of independence eventually resulted in a compromise that established the Austro-Hungarian Empire.
During World War I, the Czechoslovak National Council successfully fought for independence amidst the collapse of the Austro-Hungarian Empire, and the state of Czechoslovakia was proclaimed in 1918. The borders were set by the Treaty of Saint Germain in 1919 and by the Treaty of Trianon in 1920 Czechoslovakia incorporated the territory of present-day Slovakia which was entirely part of the Kingdom of Hungary. In the lead up to World War II, local fascist parties gradually came to power in the Slovak lands, and the first Slovak Republic was established in 1939 as a one-party clerical fascist client state under the control of Nazi Germany. In 1940, the country joined the Axis when its leaders signed the Tripartite Pact. Czechoslovakia was re-established after the country's liberation at the end of the war in 1945. Following the Soviet-backed coup of 1948, Czechoslovakia became a communist state within the Eastern Bloc, a satellite state of the Soviet Union behind the Iron Curtain and member of the Warsaw Pact. Attempts to liberalise communism culminated in the Prague Spring, which was suppressed by the Warsaw Pact invasion of Czechoslovakia in August 1968. In 1989, the Velvet Revolution peacefully ended Communist rule in Czechoslovakia. Slovakia became an independent democratic state on 1 January 1993 after the peaceful dissolution of Czechoslovakia, sometimes referred to as the Velvet Divorce.

Slovakia is a developed country with an advanced high-income economy. The country maintains a combination of a market economy with a comprehensive social security system, providing citizens with universal health care, free education, one of the lowest retirement ages in Europe and one of the longest paid parental leaves in the OECD. Slovakia is a member of the European Union, the eurozone, the Schengen Area, the United Nations, NATO, CERN, the OECD, the WTO, the Council of Europe, the Visegrád Group, and the OSCE. Slovakia is also home to eight UNESCO World Heritage Sites. Known as the "European Detroit" due to its dense concentration of automotive manufacturing, Slovakia is the world's largest per-capita car producer. The country manufactured a total of 1.08 million cars in 2023, with the automotive sector representing 44% of its total industrial output.
Etymology
Slovakia's name means the "Land of the Slavs" (Slovensko in Slovak stemming from the older form Sloven/Slovienin). As such, it is a cognate of the words Slovenia and Slavonia. In medieval Latin, German, and even some Slavic sources, the same name has often been used for Slovaks, Slovenes, Slavonians, and Slavs in general. According to one of the theories, a new form of national name formed for the ancestors of the Slovaks between the 13th and 14th century, possibly due to foreign influence; the Czech word Slovák (in medieval sources from 1291 onward). This form slowly replaced the name for the male members of the community, but the female name (Slovenka), reference to the lands inhabited (Slovensko) and the name of the language (slovenčina) all remained the same, with their base in the older form (compare to Slovenian counterparts). Most foreign translations tend to stem from this newer form (Slovakia in English, Slowakei in German, Slovaquie in French, etc.).
In medieval Latin sources, terms: Slavus, Slavonia, or Slavorum (and more variants, from as early as 1029) have been used. In German sources, names for the Slovak lands were Windenland or Windische Lande (early 15th century), with the forms Slovakia and Schlowakei starting to appear in the 16th century. The present Slovak form Slovensko is first attested in the year 1675.

History
The oldest surviving human artefacts from Slovakia are found near Nové Mesto nad Váhom and are dated at 270,000 BCE, in the Early Paleolithic era. These ancient tools, made by the Clactonian technique, bear witness to the ancient habitation of Slovakia.
Other stone tools from the Middle Paleolithic era (200,000–80,000 BCE) come from the Prévôt (Prepoštská) cave in Bojnice and from other nearby sites. The most important discovery from that era is a Neanderthal cranium (c. 200,000 BCE), discovered near Gánovce, a village in northern Slovakia.
Archaeologists have found prehistoric human skeletons in the region, as well as numerous objects and vestiges of the Gravettian culture, principally in the river valleys of Nitra, Hron, Ipeľ, Váh and as far as the city of Žilina, and near the foot of the Vihorlat, Inovec, and Tribeč mountains, as well as in the Myjava Mountains. The most well-known finds include the oldest female statue made of mammoth bone (22,800 BCE), the famous Venus of Moravany. The statue was found in the 1940s in Moravany nad Váhom near Piešťany. Numerous necklaces made of shells from Cypraca thermophile gastropods of the Tertiary period have come from the sites of Zákovská, Podkovice, Hubina, and Radošina. These findings provide the most ancient evidence of commercial exchanges carried out between the Mediterranean and Central Europe.

Bronze Age
During the Bronze Age, the geographical territory of modern-day Slovakia went through three stages of development, stretching from 2000 to 800 BCE. Major cultural, economic, and political development can be attributed to the significant growth in production of copper, especially in central Slovakia (for example in Špania Dolina) and northwest Slovakia. Copper became a stable source of prosperity for the local population.
After the disappearance of the Čakany and Velatice cultures, the Lusatian people expanded building of strong and complex fortifications, with the large permanent buildings and administrative centres. Excavations of Lusatian hill forts document the substantial development of trade and agriculture at that period. The richness and diversity of tombs increased considerably. The inhabitants of the area manufactured arms, shields, jewellery, dishes, and statues.
Iron Age
Hallstatt Period
The arrival of tribes from Thrace disrupted the people of the Kalenderberg culture, who lived in the hamlets located on the plain (Sereď) and in the hill forts like Molpír, near Smolenice, in the Little Carpathians. During Hallstatt times, monumental burial mounds were erected in western Slovakia, with princely equipment consisting of richly decorated vessels, ornaments and decorations. The burial rites consisted entirely of cremation. Common people were buried in flat urnfield cemeteries.
A special role was given to weaving and the production of textiles. The local power of the "Princes" of the Hallstatt period disappeared in Slovakia during the century before the middle of first millennium BCE, after strife between the Scytho-Thracian people and locals, resulting in abandonment of the old hill-forts. Relatively depopulated areas soon caught the interest of emerging Celtic tribes, who advanced from the south towards the north, following the Slovak rivers, peacefully integrating into the remnants of the local population.
La Tène Period
From around 500 BCE, the territory of modern-day Slovakia was settled by Celts, who built powerful oppida on the sites of modern-day Bratislava and Devín. Biatecs, silver coins with inscriptions in the Latin alphabet, represent the first known use of writing in Slovakia. At the northern regions, remnants of the local population of Lusatian origin, together with Celtic and later Dacian influence, gave rise to the unique Púchov culture, with advanced crafts and iron-working, many hill-forts and fortified settlements of central type with the coinage of the "Velkobysterecky" type (no inscriptions, with a horse on one side and a head on the other). This culture is often connected with the Celtic tribe mentioned in Roman sources as Cotini.
Roman Period
From 2 CE, the expanding Roman Empire established and maintained a series of outposts around and just south of the Danube, the largest of which were known as Carnuntum (whose remains are on the main road halfway between Vienna and Bratislava) and Brigetio (present-day Szőny at the Slovak-Hungarian border). Such Roman border settlements were built on the present area of Rusovce, currently a suburb of Bratislava. The military fort was surrounded by a civilian vicus and several farms of the villa rustica type. The name of this settlement was Gerulata. The military fort had an auxiliary cavalry unit, approximately 300 horses strong, modelled after the Cananefates. The remains of Roman buildings have also survived in Stupava, Devín Castle, Bratislava Castle Hill, and the Bratislava-Dúbravka suburb.

Near the northernmost line of the Roman hinterlands, the Limes Romanus, there existed the winter camp of Laugaricio (modern-day Trenčín) where the Auxiliary of Legion II fought and prevailed in a decisive battle over the Germanic Quadi tribe in 179 CE during the Marcomannic Wars. The Kingdom of Vannius, a kingdom founded by the Germanic Suebi tribes of Quadi and Marcomanni, as well as several small Germanic and Celtic tribes, including the Osi and Cotini, existed in western and central Slovakia from 8–6 BCE to 179 CE.
Great invasions from the fourth to seventh centuries
In the second and third centuries CE, the Huns began to leave the Central Asian steppes. They crossed the Danube in 377 CE and occupied Pannonia, which they used for 75 years as their base for launching looting-raids into Western Europe. However, Attila's death in 453 brought about the disappearance of the Hunnic empire. In 568, a Turko-Mongol tribal confederacy, the Avars, conducted its invasion into the Middle Danube region. The Avars occupied the lowlands of the Pannonian Plain and established an empire dominating the Carpathian Basin.
In 623, the Slavic population living in the western parts of Pannonia seceded from their empire after a revolution led by Samo, a Frankish merchant. After 626, the Avar power started a gradual decline but its reign lasted to 804.

Avars
In 568, the Avars, under Khagan Bayan I established an empire in the Carpathian Basin that lasted for 250 years.
Slavic states
The Slavic tribes settled in the territory of present-day Slovakia in the fifth century. Western Slovakia was the centre of Samo's empire in the seventh century. A Slavic state known as the Principality of Nitra arose in the eighth century and its ruler Pribina had the first known Christian church of the territory of present-day Slovakia consecrated by 828. Together with neighbouring Moravia, the principality formed the core of the Great Moravian Empire from 833. The high point of this Slavonic empire came with the arrival of Saints Cyril and Methodius in 863, during the reign of Duke Rastislav, and the territorial expansion under King Svätopluk I.
Great Moravia (830–before 907)
Great Moravia arose around 830 when Mojmír I unified the Slavic tribes settled north of the Danube and extended the Moravian supremacy over them. When Mojmír I endeavoured to secede from the supremacy of the king of East Francia in 846, King Louis the German deposed him and assisted Mojmír's nephew Rastislav (846–870) in acquiring the throne. The new monarch pursued an independent policy: after stopping a Frankish attack in 855, he also sought to weaken the influence of Frankish priests preaching in his realm. Duke Rastislav asked the Byzantine Emperor Michael III to send teachers who would interpret Christianity in the Slavic vernacular.
In 862, Prince Rastislav of Moravia rebelled against the Franks, and after hiring Hungarian troops, won his independence; this was the first time that Hungarians expeditionary troops entered the Carpathian Basin.
On Rastislav's request, two brothers, Byzantine officials and missionaries Saints Cyril and Methodius came in 863. Cyril developed the first Slavic alphabet and translated the Gospel into the Old Church Slavonic language. Rastislav was also preoccupied with the security and administration of his state. Numerous fortified castles built throughout the country are dated to his reign and some of them (e.g., Dowina, sometimes identified with Devín Castle) are also mentioned in connection with Rastislav by Frankish chronicles.
During Rastislav's reign, the Principality of Nitra was given to his nephew Svätopluk as an appanage. The rebellious prince allied himself with the Franks and overthrew his uncle in 870. Similarly to his predecessor, Svätopluk I (871–894) assumed the title of the king (rex). During his reign, the Great Moravian Empire reached its greatest territorial extent, when not only present-day Moravia and Slovakia but also present-day northern and central Hungary, Lower Austria, Bohemia, Silesia, Lusatia, southern Poland and northern Serbia belonged to the empire, but the exact borders of his domains are still disputed by modern authors. Svatopluk also withstood attacks of the Magyar tribes and the Bulgarian Empire, although sometimes it was he who hired the Magyars when waging war against East Francia.
In 880, Pope John VIII set up an independent ecclesiastical province in Great Moravia with Archbishop Methodius as its head. He also named the German cleric Wiching the Bishop of Nitra.
After the death of Prince Svatopluk in 894, his sons Mojmír II (894–906?) and Svatopluk II succeeded him as the Prince of Great Moravia and the Prince of Nitra respectively. However, they started to quarrel for domination of the whole empire. Weakened by an internal conflict as well as by constant warfare with Eastern Francia, Great Moravia lost most of its peripheral territories.
It is not known what happened with both Mojmír II and Svatopluk II because they are not mentioned in written sources after 906. In three battles (4–5 July and 9 August 907) near Bratislava, the Magyars routed Bavarian armies. Some historians put this year as the date of the break-up of the Great Moravian Empire, due to the Hungarian conquest; other historians take the date a little bit earlier (to 902).
Great Moravia left behind a lasting legacy in Central and Eastern Europe. The Glagolitic script and its successor Cyrillic were disseminated to other Slavic countries, charting a new path in their sociocultural development.
Grand Principality of Hungary (895–1000)
Foundation of the Hungarian state is connected to the Hungarian conquerors, who arrived from the Pontic steppes as a confederation of seven tribes. The Hungarians arrived in the frame of a strong centralized steppe-empire under the leadership of Grand Prince Álmos and his son Árpád, they became founders of the Árpád dynasty, the Hungarian ruling dynasty and the Hungarian state. The Árpád dynasty claimed to be a direct descendant of the great Hun leader Attila. The Hungarians took possession of the Carpathian Basin in a pre-planned manner, with a long move-in between 862 and 895. Their armies' advance may have been promoted by continuous wars among the countries of the region whose rulers still hired them occasionally to intervene in their struggles.
Just a few decades after the collapse of the Avar Khaganate in 822, once again a steppe empire, the Hungarian Grand Principality united the Carpathian Basin under its rule. Only the East Frankish Empire had such military power that it could intervent in the formation of the new order. His leadership also wanted to eliminate the new steppe state because the East Frankish Empire lost Pannonia and its Christian Avar taxpayers, and his territory was hit by increasing attacks by the Hungarians, especially Bavaria, which was then the eastern province of the Eastern Frankish Kingdom. In 907, three East Francian armies led by Luitpold, Margrave of Bavaria, which entered the Hungarian territory in order to expel the Hungarians from the Carpathian Basin, is annihilated by the Hungarian army at the Battle of Pressburg. Luitpold, Margrave of Bavaria, Dietmar I, Archbishop of Salzburg, Prince Sieghard, 19 counts, 2 bishops, and 3 abbots are killed in the battle, together with the majority of the soldiers. The Hungarians secured the lands they gained during the Hungarian conquest of the Carpathian Basin, and prevented a future German invasion, the Germans did not launch an imperial scale campaign against Hungary for 123 years until 1030.
The Kingdom of Hungary, the Habsburg Monarchy and the Ottoman Empire (1000–1918)
In 972, the ruling prince Géza of the Árpád dynasty officially started to integrate Grand Principality of Hungary into Christian Western Europe. His son Saint Stephen I became the first King of Hungary after defeating his pagan uncle Koppány. Under Stephen, Hungary was recognised as a Catholic Apostolic Kingdom. Applying to Pope Sylvester II, Stephen received the insignia of royalty (including probably a part of the Holy Crown of Hungary) from the papacy.
In the years 1001–1002 and 1018–1029, Slovakia was part of the Kingdom of Poland, having been conquered by Boleslaus I the Brave. After the territory of Slovakia was returned to Hungary, a semi-autonomous polity continued to exist (or was created in 1048 by king Andrew I) called Duchy of Nitra. Comprising roughly the territory of Principality of Nitra and Bihar principality, they formed what was called a tercia pars regni, third of a kingdom.
This polity existed up until 1108/1110, after which it was not restored. After this, up until the collapse of Austria-Hungary in 1918, the territory of Slovakia was an integral part of the Hungarian state. The ethnic composition of Slovakia became more diverse with the arrival of the Carpathian Germans in the 13th century and the Jews in the 14th century.
A significant decline in the population resulted from the invasion of the Mongols in 1241 and the subsequent famine. After the invasion, much of the territory was destroyed, but was recovered largely thanks to Hungarian king Béla IV. However, in medieval times the area of Slovakia was characterised by German and Jewish immigration, burgeoning towns, construction of numerous stone castles, and the cultivation of the arts. The arrival of German element sometimes proved a problem for the autochthonous Slovaks (and even Hungarians in the broader Hungary), since they often quickly gained most power in medieval towns, only to later refuse to share it. Breaking of old customs by Germans often resulted in national quarrels. One of which had to be sorted out by the king Louis I. with the proclamation Privilegium pro Slavis (Privilege for Slovaks) in the year 1381. According to this privilege, Slovaks and Germans were to occupy each half of the seats in the city council of Žilina and the mayor should be elected each year, alternating between those nationalities. This would not be the last such case.
In 1465, King Matthias Corvinus founded the Hungarian Kingdom's third university, in Pressburg (Bratislava), but it was closed in 1490 after his death. Hussites also settled in the region after the Hussite Wars.
Owing to the Ottoman Empire's expansion into Hungarian territory, Bratislava was designated the new capital of Hungary in 1536, ahead of the fall of the old Hungarian capital of Buda in 1541. It became part of the Austrian Habsburg monarchy, marking the beginning of a new era. The territory comprising modern Slovakia, then known as Upper Hungary, became the place of settlement for nearly two-thirds of the Magyar nobility fleeing the Turks and became far more linguistically and culturally Hungarian than it was before. Partly thanks to old Hussite families and Slovaks studying under Martin Luther, the region then experienced a growth in Protestantism. For a short period in the 17th century, most Slovaks were Lutherans. They defied the Catholic Habsburgs and sought protection from neighbouring Transylvania, a rival continuation of the Magyar state that practised religious tolerance and normally had Ottoman backing. Upper Hungary, modern Slovakia, became the site of frequent wars between Catholics in the west territory and Protestants in the east, as well as against Turks; the frontier was on a constant state of military alert and heavily fortified by castles and citadels often manned by Catholic German and Slovak troops on the Habsburg side. By 1648, Slovakia was not spared the Counter-Reformation, which brought the majority of its population from Lutheranism back to Roman Catholicism. In 1655, the printing press at the Trnava university produced the Jesuit Benedikt Szöllősi's Cantus Catholici, a Catholic hymnal in Slovak that reaffirmed links to the earlier works of Cyril and Methodius.
The Ottoman wars, the rivalry between Austria and Transylvania, and the frequent insurrections against the Habsburg monarchy inflicted a great deal of devastation, especially in the rural areas. In the Austro-Turkish War (1663–1664) a Turkish army led by the Grand Vizier decimated Slovakia. In 1682, the Principality of Upper Hungary, a short-lived Ottoman vassal state, was established in the territory of modern Slovakia. Prior to this, regions on its southern rim were already encompassed in the Egri, Budin and Uyvar eyalets. Thököly's kuruc rebels from the Principality of Upper Hungary fought alongside the Turks against the Austrians and Poles at the Battle of Vienna of 1683 led by John III Sobieski. As the Turks withdrew from Hungary in the late 17th century, the importance of the territory composing modern Slovakia decreased, although Pressburg retained its status as the capital of Hungary until 1848 when it was transferred back to Buda.
During the revolution of 1848–49, the Slovaks started uprising, supporting the Austrian Emperor, hoping for independence from the Hungarian part of the Dual Monarchy and greater autonomy within the empire. They failed to achieve their aim, but the conflict resulted in Slovak rights for language in certain administrative and educational areas.
Thereafter, relations between the nationalities deteriorated (see Magyarisation), culminating in the secession of Slovakia from Hungary after World War I.
Czechoslovak independence (1918–1939)
On 18 October 1918, Tomáš Garrigue Masaryk, Milan Rastislav Štefánik and Edvard Beneš declared in Washington, D.C. the independence for the territories of Bohemia, Moravia, Silesia, Upper Hungary and Carpathian Ruthenia from the Austro-Hungarian Empire and proclaimed a common state, Czechoslovakia.
During the chaos following the break-up of Austria-Hungary, Czechoslovakia was formed with numerous Czechs, Germans, Slovaks, Hungarians and Ruthenians. The borders were set by the Treaty of Saint Germain in 1919 and Treaty of Trianon in 1920. By the treaties following the World War I, Czechoslovakia emerged as a sovereign European state.
During the Interwar period, democratic Czechoslovakia was allied with France, and also with Romania and Yugoslavia (Little Entente); however, the Locarno Treaties of 1925 left East European security open. Both Czechs and Slovaks enjoyed a period of relative prosperity. There was progress in not only the development of the country's economy but also culture and educational opportunities. Yet the Great Depression caused a sharp economic downturn, followed by political disruption and insecurity in Europe.
In the 1930s, Czechoslovakia came under continuous pressure from the revanchist governments of Germany, Hungary and Poland who used the aggrieved minorities in the country as a useful vehicle. Revision of the borders was called for, as Czechs constituted only 43% of the population. Eventually, this pressure led to the Munich Agreement of September 1938, which allowed the majority ethnic Germans in the Sudetenland, borderlands of Czechoslovakia, to join with Germany. The remaining minorities stepped up their pressures for autonomy and the State became federalised, with Diets in Slovakia and Ruthenia. The remainder of Czechoslovakia was renamed Czecho-Slovakia and promised a greater degree of Slovak political autonomy. This, however, failed to materialise. Parts of southern and eastern Slovakia were also reclaimed by Hungary at the First Vienna Award of November 1938.
Fascist regime during World War II (1939–1945)
After the Munich Agreement and its Vienna Award, Nazi Germany threatened to annex part of Slovakia and allow the remaining regions to be partitioned by Hungary or Poland unless independence was declared. Thus, Slovakia seceded from Czecho-Slovakia in March 1939 and allied itself, as demanded by Germany, with Hitler's coalition. Secession had created the first Slovak state in history.
A one-party clerical fascist Slovak Republic governed by the far-right Hlinka's Slovak People's Party was led by President Jozef Tiso and Prime Minister Vojtech Tuka. The (First) Slovak Republic is primarily known for its collaboration with Nazi Germany, which included sending troops to the invasion of Poland in September 1939 and the Soviet Union in 1941. On 24 November 1940, Slovakia joined the Axis when its leaders signed the Tripartite Pact. The country was strongly influenced by Germany and gradually became a puppet regime in many respects.