History of Slovakia: The Great Moravian Empire
Once the Franks had defeated the Avars, two separate Slavic communities began to emerge on either side of the White Carpathian mountain range. They were the principalities of Moravia and Nitra.
Prince Pribina of Nitra, ruled over a growing Slavic noble class in Western and Central Slovakia. He was astute enough to recognize the political importance of religion in the area, with respect to the neighboring Christian Frankish and Bavarian Kingdoms, and so it was he who first introduced Christianity to the Slavs, in 828. Meanwhile, to the West of the White Carpathians, Prince Mojmir ruled over an area of what is today Moravia, as well as parts of Western Slovakia. Mojmir wanted to expand his principality further, and so in 833 he attacked Nitra, driving Pribina out of the region, and thus uniting the two Slavic principalities.

Mojmir I became the first Ruler of the Principality of Mojmir, as it was known at that time. It was one hundred years later when it was first called the Great Moravian Empire, by the Byzantine Emperor Constantine VII.

 

Although Pribina was defeated at Nitra, he actually fared rather better than Mojmir following the battle. Having fled Nitra he found himself in favor with the Frankish King, Louis 'the German', and was given a principality in Pannonia (present day Hungary). Late in life, he was baptized in the Christian faith, and set about building churches and christening the people of Pannonia.

Meanwhile, Mojmir had a difficult time ruling over Nitra, facing many conflicts during his reign. He was finally dethroned by King Louis in 846, who had him arrested and replaced by Mojmir's nephew, Rastislav. Prince Rastislav was a far more successful ruler than his uncle had been, but nevertheless soon found himself involved in a dispute with King Louis, which led to the Franks invading Great Moravia in 855. Skirmishes between Great Moravia and the Franks lasted until 859, when a peace treaty was signed.
Rastislav will be best remembered in Slovak history for his role in bringing the Christian Missionary brothers, Cyril and Method, over from Constantinople. This was a politically astute move by Rastislav, for as well as stopping the influence of Frankish missionaries, it strengthened ties with the Byzantine Empire. Rastislav's downfall came in the shape of his nephew, Svatopluk, whose treachery led to Rastislav's imprisonment and death at the hands of the Franks. Svatopluk, who was a close friend of King Louis' son, Carloman, then succeeded his uncle as Prince of Nitra.
Svatopluk proved to be a very strong leader, and the Great Moravian Empire prospered under his 24 year reign. In 894, when Svatopluk the Great died, his three sons, Svatopluk II, Mojmir II and Bratislav took over control of the Great Moravian Empire. Their father warned them that the Empire would only survive the growing external threats of the Frank and Bavarian armies and the new threat of the Magyar tribes, if they remained unified. Although Mojmir and Bratislav had a strong relationship, they did not with their brother Svatopluk, and their internal conflicts would eventually lead to the break up of the Great Moravian Empire.