John I secured the eastern part of the kingdom (known as Eastern Hungarian Kingdom). Habsburg monarchs needed the economic power of Hungary for the Ottoman wars. During the Ottoman wars the territory of former Kingdom of Hungary was reduced by around 70%; despite these enormous territorial and demographic losses, the smaller heavily war-torn Royal Hungary remained economically more important than Austria or Kingdom of Bohemia even by the end of 16th century. Territory of present-day Slovakia and northwestern Transdanubia were constant parts of this polity while the control was often switched at region of northeastern Hungary between Royal Hungary and 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, the rival Hungarian king, abdicated as King of Hungary in Emperor Maximilian II's favor, which was expressed in 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". The Habsburgs, an influential dynasty of the Holy Roman Empire, were elected Kings of Hungary. Royal Hungary became a part of the Habsburg Monarchy and enjoyed little influence in Vienna. The Habsburg King directly controlled Royal Hungary's financial, military, and foreign affairs, and imperial troops guarded its borders. The Habsburgs avoided filling the office of palatine to prevent the holder's amassing too much power. In addition, the so-called Turkish question divided the Habsburgs and the Hungarians: Vienna wanted to maintain peace with the Ottomans; the Hungarians wanted the Ottomans ousted. As the Hungarians recognized the weakness of their position, many became anti-Habsburg. They complained about foreign rule, the behaviour of foreign garrisons, and the Habsburgs' recognition of Turkish sovereignty in Transylvania (Principality of Transylvania was usually under the suzerainty of the Ottoman Empire, however it often had dual vassalage -Ottoman Turkish sultans and the Habsburg Hungarian kings- in the 16th and 17th centuries). Protestants, who were persecuted in Royal Hungary, considered the Counter-Reformation a greater menace than the Turks, however. The Reformation spread quickly, and by the early 17th century hardly any noble families remained Catholic.