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. Svätopluk also withstood attacks of the seminomadic Hungarian tribes and the Bulgarian Empire, although sometimes it was he who hired the Hungarians 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 King Svätopluk in 894, his sons Mojmír II (894–906?) and Svatopluk II succeeded him as the King 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. In the meantime, the Hungarian tribes, having suffered a defeat from the nomadic Pechenegs, left their territories east of the Carpathian Mountains, invaded the Pannonian Basin and started to occupy the territory gradually around 896. 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. Both Mojmír II and Svätopluk II probably died in battles with the Hungarians between 904 and 907 because their names are not mentioned in written sources after 906. In three battles (4–5 July and 9 August 907) near Brezalauspurc (now Bratislava), the Hungarians routed Bavarian armies. Historians traditionally put this year as the date of the breakup of the Great Moravian Empire. 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 cultural development. The administrative system of Great Moravia may have influenced the development of the administration of the Kingdom of Hungary. High Middle Ages Settlement of Hungarians in the 10th