Principality of Upper Hungary

The Principality of Upper Hungary (; ) was a short lived Ottoman vassal state ruled by Imre Thököly.
Background.
The region of Upper Hungary was considered to be an appanage principality, and it was usually managed by the heir of Hungarian throne, or by a brother of the reigning king. This territory would be administrated from the city of Pozsony (, today's Bratislava). After peace treaty of Vasvár was signed in 1664, loyalty felt by Hungarians towards Habsburg dynasty was in decline. Imperial administration acted against interests of the Hungarian estates. In 1671 a rebellion was successfully thwarted. However, a year later Mihály Teleki led a more successful rebellion. In 1680 Imre Thököly became the leading figure of the rebellion. These rebellions were supported and sustained by the Ottoman state and the Principality of Transylvania.
Establishment and later history.
The principality was established on 19 November 1682. The polity agreed to pay 20,000 gold coins to the Ottomans annually. In 1685 Thököly was defeated at Eperjes (present-day Prešov) and the Turks imprisoned him because of his previous negotiations with Leopold therefore his realm ceased to exist.