In 1604, Catholics seized the Lutheran church in Kassa. The Calvinist Stephen Bocskay then occupied Kassa during his Protestant, Ottoman-backed insurrection against the Habsburg dynasty. The future George I Rákóczi joined him as a military commander there. Giorgio Basta, commander of the Habsburg forces, failed in his attempt to capture the city. At the Treaty of Vienna (1606), in return for giving territory including Kassa back, the rebels won the Habsburg concession of religious toleration for the Magyar nobility and brokered an Austrian-Turkish peace treaty. Stephen Bocskay died in Kassa on December 29, 1606, and was interred there.