Royal Hungary was the name of the portion of the medieval Kingdom of Hungary where the Habsburgs were recognized as Kings of Hungary in the wake of the Ottoman victory at the Battle of Mohács (1526) and the subsequent partition of the country. Temporary territorial division between the rival rulers John I and Ferdinand I occurred only in 1538, under the Treaty of Nagyvárad, when the Habsburgs got the northern and western parts of the country (Royal Hungary), with the new capital Pressburg (Pozsony, now Bratislava). John I secured the eastern part of the kingdom (known as the Eastern Hungarian Kingdom). Habsburg monarchs needed the economic power of Hungary for the Ottoman wars. During the Ottoman wars the territory of the former Kingdom of Hungary was reduced by around 60 per cent. Despite these enormous territorial and demographic losses, the smaller and heavily war torn Royal Hungary was as important as the Austrian hereditary lands or the Bohemian crown lands in the late 16th century.
The territory of present-day Slovakia and northwestern Transdanubia were parts of this polity, while control of the region of northeastern Hungary often shifted between Royal Hungary and the Principality of Transylvania. The central territories of the medieval Hungarian kingdom were annexed by the Ottoman Empire for 150 years (see Ottoman Hungary). In 1570, John Sigismund Zápolya abdicated as King of Hungary in Emperor Maximilian II's favor under the terms of the Treaty of Speyer. The term "Royal Hungary" fell into disuse after 1699, and the Habsburg Kings referred to the newly enlarged country by the more formal term "Kingdom of Hungary".