In 1606 (within the Stephen Bocskay Uprising) Bocskay troops occupy the surroundings of Pressburg. Bethlen conquers Pressburg in 1619, as a part of the Gabriel Bethlen uprising. He is defeated by imperial troops in 1621 and then besieges the town from 1621 to 1622. The (3rd) Peace of Pressburg between Gabriel Bethlen and the emperor Ferdinand II, Holy Roman Emperor is signed in 1626, which puts an end to the Bethlen anti-Habsburg uprising. From 1671 to 1677 Pressburg is seat of extraordinary courts against the Protestants and participants of anti-Habsburg uprisings; "e.g." a trial against the participants of the Wesselényi conspiracy takes place in 1671. Within the Imre Thököly Uprising from 1682 to 1683 Pozsony is the only town in present-day Slovakia that refuses to capitulate to Thököly's troops. Finally, the town, but not the castle capitulates in July 1683 and is only reconquered by imperial troops after the Turks have been defeated near Vienna (which happened in September 1683). The last of these uprisings that touched the town was in 1704 (within the Rákóczi Uprising), when Prince Eugene of Savoy manages to protect Pressburg from Rákóczi's troops, but the surroundings of the town are totally destroyed.