Emeric Thököly de Késmárk was a Hungarian nobleman, leader of anti-Habsburg uprisings like his father, Count István Thököly, before him. Emeric was Prince of Upper Hungary, an Ottoman vassal state, from 1682 to 1685, and briefly Prince of Transylvania during the year 1690. Having formed an alliance with the Turks, Thököly assisted the Ottoman Empire at the Battle of Vienna in 1683 and led the Turkish cavalry at the battle of Zenta. Refusing to surrender to Habsburg Emperor Leopold I, Thököly lost his principality of Upper Hungary and finally retired to Galata, near Constantinople, with large estates granted him by Mustafa II.