History of Slovakia: The Kingdom of Hungary
In the year 896, only two years after Svatopluk the Great's death, Magyar tribes crossed into the territory that is now Slovakia for the first time. As the Great Moravian Empire crumbled, the Magyars slowly but surely forged deeper into Slovak territory, until finally at the Battle of Bratislava, in 907, the Great Moravian Empire was defeated once and for all. It would be the last time that Slovaks ruled their lands for more than a Millennium.
Slovakia now saw fifty years of battles and skirmishing between the nomadic Magyars and the neighboring Franks, which finally came to an end in 955 when the Frankish King, Otto I, completely destroyed the Magyar army. This heavy defeat forced the Magyars to give up their nomadic lifestyle of attacking and pillaging towns, and settle down. Over the next three centuries the Magyars slowly but surely integrated themselves into the lands of the former Great Moravia, adopting many of the Slovaks customs, as well as Christianity.
In 1241, history repeated itself, as another nomadic tribe attacked the region from the East. This time it was the turn of the Tatars, who were also a Mongolian tribe, as the Magyars had been. Again the region of Slovakia was devastated as well as the rest of the Hungarian Kingdom, as battles raged between King Belo of Hungary and the Tatar forces. Belo was defeated and driven into exile after the battle of Slana River, as the Tatars took a foothold in the area that is present day Hungary. However, the Kingdom of Hungary was given a respite when the Great Khan Ogadan (son of Genghis) died, and the Tatar forces returned home so as to elect a new leader. King Belo then returned from his exile, and set about strengthening the Kingdom with many fortresses and castles, in order to keep out any future threat from the East.
Despite the Tatar invasion, on the whole Slovakia prospered in the first 500 years as a state in the Kingdom of Hungary. Rich in minerals and fairly well developed economically, Slovakia was one of the biggest producers of silver and gold in the whole of Europe.