Topic summary
Emperor Leopold I

Extracted from the Wikipedia article Leopold I, Holy Roman Emperor.
Success against the Ottoman Turks and in Hungary
On 12 September 1683, the allied army fell upon the enemy, who was completely routed, and Vienna was saved. The Imperial forces, among whom Prince Eugene of Savoy was rapidly becoming prominent, followed up the victory with others, notably one near Mohács in 1687 and another at Zenta in 1697, and in January 1699, Sultan Mustafa II signed the Treaty of Karlowitz by which he ceded almost the whole of Hungary (including Serbs in Vojvodina) to the Habsburg monarchy. As the Habsburg forces retreated, they withdrew 37,000 Serb families under Patriarch Arsenije III Čarnojević of the Serbian Patriarchate of Peć. In 1690 and 1691, Emperor Leopold I had conceived through a number of edicts (Privileges) the autonomy of Serbs in his dominions, which would last and develop for more than two centuries until its abolition in 1912. Before the conclusion of the war, however, Leopold had taken measures to strengthen his hold upon this country. In 1687, the Diet of Hungary in Pressburg (now Bratislava) changed the constitution; the right of the Habsburgs to succeed to the throne without election was admitted and the emperor's elder son Joseph I, Holy Roman Emperor was crowned hereditary King of Hungary.