In 1656, a conflict over religious refugees from Schwyz who had fled to Zürich erupted in the First War of Villmergen. The Catholics were victorious and able to maintain their political dominance, and a treaty agreement that each canton would be totally independent with respect to religious matters. Around 1707 unrest erupted in the city of Geneva which continued throughout the early modern period. Additionally in 1707, the Toggenburg valley rebelled against the Prince-Abbot of St. Gall. Attempts by the Abbot to suppress the valley led to the Second Battle of Villmergen in 1712 and the sacking of the Abbey of St. Gall by Bernese and Zürich troops. From 1719–22 the Werdenberg region rebelled against the city of Glarus.