The repression of Protestants and the land seizures frustrated the Hungarians, and in 1703 a peasant uprising sparked an eight-year rebellion against Habsburg rule. In Transylvania, which became the part of Hungary again at the end of the 17th century (as a province, called "Principality of Transylvania" with the Diet seated at Gyulafehérvár), the people united under Francis II Rákóczi, a Roman Catholic magnate. Most of Hungary soon supported Rákóczi, and the Hungarian Diet voted to annul the Habsburgs' right to the throne. Fortunes turned against the Hungarians, however, when the Habsburgs made peace in the West and turned their full force against them. The war ended in 1711, when Count Károlyi, General of the Hungarian Armies agreed to the Treaty of Szatmár. The treaty contained the emperor's agreement to reconvene the Diet in Pressburg and to grant an amnesty for the rebels.