The Principality of Transylvania was a Hungarian principality in Transylvania that existed from 1570 to 1711, with Gyulafehérvár (Alba Iulia) serving as its capital for most of its history. After the 1526 Battle of Mohacs led to a succession crisis in Hungary, Ottoman sultan Suleiman the Magnificent recognized John Zapolya as king in Transylvania. Transylvania became a principality in 1570 after John's son John Sigismund Zapolya renounced his claim to the Hungarian kingship, which had fallen into Habsburg hands. Free from Catholic religious authority, Transylvania became a bastion of Lutheranism and Calvinism. Transylvania was a loyal vassal of the Turks until 1606, when the Treaty of Vienna guaranteed the right of Transylvanians to elect their own independent princes. From 1613 to 1629, Gabor Bethlen rejected Habsburg attempts to oppress his Protestant subjects, thrice warring on the Holy Roman Emperor and involving Transylvania in the Thirty Years' War. In 1657, George II Rakoczi invaded Poland-Lithuania amid the Deluge. In 1660, the Ottomans conquered Nagyvarad, marking the decline of the principality. After the 1683 Battle of Vienna, the Austrians began to impose their rule on Transylvania, which was formally attached to Habsburg Hungary after 1699. After 1711, the princes of Transylvania were replaced with Habsburg-appointed governors of a "Grand Principality of Transylvania."
