The first recorded tribes settled in the territory of modern Slovakia were Celts (from around 450 B. C.), whose culture represented the pinnacle of barbarian civilisation. The remains of Celtic oppida (elevated, fortified settlements) can be found, for example, in Bratislava, Devín and on Havránok Hill near the Liptovská Mara reservoir.
The Celts were forced out by the Germanic tribes (Marcomanni) which fought with the Roman Emperors Marcus Aurelius and Commodus (A. D. 166 – 180). Remains of the Limes Romanus (the fortifications on the Roman Empire’s northern border) are preserved in Slovakia (in Rusovce, Trenčín or Iža). The German tribes were driven out by Huns led by Attila.
Tribes of Western Slavs arrived in the territory of modern Slovakia at the end of the 5th and beginning of the 6th century. Soon they had to defend themselves against nomadic Avars and created a tribal union under the rule of the Frankish merchant Samo, known as Samo’s Empire (A. D. 623 – 658).
After the break‑up of Samo’s Empire, Slavonic tribes experienced a loss of political unity. Only Duke Pribina succeeded in establishing a larger state‑like entity and built the first church in this area between 824 and 828. He fought and was defeated by Mojmír, the Duke of Moravia, and had to flee. Duke Mojmír I established a united state called Great Moravia (830 – 908). His successor Rastislav invited missionaries Ss. Cyril and Methodius to Great Moravia. They established an independent church province, developed the first Slavic alphabet (Glagolitic alphabet) using Greek symbols, and used it to translate the Bible into vernacular. The most important ruler of Great Moravia was Svätopluk who fought with East Francia (Kingdom of the East Franks). Great Moravia disintegrated after its invasion by Magyar tribes and the successes of East Francia. Sites dating back to the time of Great Moravia may be found, for example, at Devín, Nitra, and Ducové.
The Magyar tribes established a Hungarian Empire in the Danube area, and the territory of present‑day Slovakia was absorbed in it around A. D. 1000. The history of Slovakia was thus interwoven with that of the Hungarian state until 1918.
The development of the Hungarian Empire was interrupted by the Tatar invasion (1240 – 1242). After the Tatars left, Belo IV invited Saxons to come and live in Hungary, which significantly strengthened urban civilisation. After the male line of the Árpád dynasty died out in 1301, Charles Robert of Anjou became king in 1308 and established the Anjou dynasty, which was followed by the Jagiellonian dynasty in 1440.
The period of humanism and renaissance in the Hungarian Empire is represented by its ruler, Matthias Corvinus (1458 – 1490). The first university in the territory of present‑day Slovakia, Academia Istropolitana (1465 – 1491), was established in Bratislava during his rule.
In 1526, King Louis II of the Jagiellonian dynasty was defeated and killed by Turks in the battle near Mohács. This battle started the period of Turkish occupation of the region including a significant part of the territory of the Hungarian Empire. The territory of present‑day Slovakia became the administrative and economic centre of the rest of the Hungarian Empire, and Bratislava was the coronation site of many Hungarian kings from 1563 to 1830 (including Maria Theresa from the Habsburg family in 1741).
In 1635, Péter Pázmány established Trnava University in Trnava (which was relocated to Budapest in 1777). The Jesuits founded Košice University in Košice in 1657.
The numerous anti‑Habsburg uprisings organised by Hungarian nobility were curtailed by the 1711 Peace of Szatmár. However, it did not stop unrest amongst the House's subjects, a fact that was reflected in the high levels of emigration and banditry. At this time, the legend of the most famous of Slovak outlaw, who was stealing from the rich to give the loot to the poor, Juraj Jánošík, was born.
The 18th century saw the development of manufacturing and the modernisation of mining technology. In 1762, the enlightened absolutist ruler Maria Theresa established the Mining Academy in Banská Štiavnica – the first school of mining in the world. In 1774, she also introduced compulsory school attendance. Her son, Emperor Joseph II, abolished serfdom in the Hungarian Empire in 1785.
Slovak national consciousness rekindled in the 18th and 19th centuries, and Slovak civil society began to emerge. The first written form of the Slovak language was codified in 1847, and the first political programme was proclaimed in 1848. In 1861, the Memorandum of the Slovak Nation was published, and in 1863, "Matica slovenská", a scientific and cultural institution focusing on topics related to the Slovak nation, was established. The late 19th and early 20th centuries were marked by the struggle against Hungarian nationalist tendencies, culminating in the creation of the Czechoslovak Republic.
Czechoslovakia was established with the end of World War I and the dissolution of the Austro‑Hungarian Monarchy in 1918. The period of prosperity of the newly established republic followed until the world’s economic crisis and the later advent of Nazism. In 1939, Slovakia was proclaimed de iure autonomous. However, its sovereignty was extremely limited due to strong economic, military and political dependency on Germany. The Slovak National Uprising during World War II, in 1944, was a clear indication of the country’s opposition to Nazism. In 1945, the Czech and Slovak states joined again.
In 1948, a communistic putsch took place – the so‑called February Revolution. The 1950s in Czechoslovakia were a period of political oppression, characterised by the victimisation of prominent political, cultural and religious individuals, and even of ordinary people. In 1968, Alexander Dubček (the then leader of the Communist Party of Czechoslovakia) introduced the policy known as socialism with a human face. The period of liberalisation of the Communist regime (known as the Prague Spring) ended with the Warsaw Pact invasion of Czechoslovakia in August 1968.
A period of “normalisation” (restoration of the conditions prevailing before the reform period), which plunged Czechoslovakia into the economic, political and moral decline, lasted until the 1980s. Nevertheless, the opposition towards the regime grew and during the late 1980s, it became more intense and organised. The overthrow of the communist government in November 1989 is referred to as the Velvet Revolution.
On 1 January 1993, the Czech and Slovak Federal Republic has peacefully divided into two independent states - the Czech Republic and Slovakia. Slovakia immediately joined the United Nations as a fully‑fledged member. In October 1993, the European Parliament ratified the association agreement between the Slovak Republic and the European Union. In March 2004, Slovakia joined NATO, and on 1 May 2004, the European Union. In December 2007, Slovakia became part of the Schengen Area, and in 2009 joined the euro area and adopted euro as its currency.