For some decades during the 17th century Kassa was part of the Principality of Transylvania, and consequently a part of the Ottoman Empire and was referred to as "Kaşa" in Turkish. On September 5, 1619, the prince of Transylvania, Gabriel Bethlen captured Kassa with the assistance of the future George I Rákóczi in another anti-Habsburg insurrection. By the Peace of Nikolsburg in 1621, the Habsburgs restored the religious toleration agreement of 1606 and recognized Transylvanian rule over the seven Partium countries: Ugocsa, Bereg, Zemplén, Borsod, Szabolcs, Szatmár and Abaúj (including Kassa). Bethlen married Catherine von Hohenzollern, of Johann Sigismund Kurfürst von Brandenburg, in Kassa in 1626.