The first recorded Slavic political union, Samo’s Empire (c. 623–658), was a tribal confederation formed to defend against the Avars. Led by the Frankish merchant Samo, it famously defeated the Frankish King Dagobert I at the Battle of Wogastisburg in 631. The core of this realm likely included parts of modern-day Moravia and western Slovakia.
Following the decline of Samo’s realm, the Principality of Nitra emerged as a distinct polity. Its ruler, Pribina, sponsored the consecration of the first Christian church on Slovak territory in Nitra around 828. In 833, Pribina was expelled by Mojmír I of Moravia, who united the two principalities to create Great Moravia.
Great Moravia flourished under Mojmír’s successors. Prince Rastislav (846–870) sought to reduce Frankish influence by requesting missionaries from the Byzantine Empire. In 863, the brothers Cyril and Methodius arrived. They created the Glagolitic alphabet, the first script for a Slavic language, and translated religious texts into what is now known as Old Church Slavonic, establishing a literary and liturgical tradition independent of Latin.
The empire reached its greatest territorial extent under Svatopluk I (870–894), expanding to include Bohemia, parts of modern-day Poland, and Hungary. However, after his death, internal conflicts and the invasion of Magyar tribes led to the disintegration of Great Moravia in the early 10th century.