During Rastislav's reign, the 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. Svatopluk also withstood attacks of the Magyar tribes and the Bulgarian Empire, although sometimes it was he who hired the Magyars when waging war against East Francia.