their rivals. Politically, they all tried to take influence, by way of mercenary commanders such as Jörg Jenatsch or Johann Rudolf Wettstein. The Drei Bünde of Grisons, at that point not yet a member of the Confederacy, were involved in the war from 1620, which led to their loss of the Valtellina in 1623. At the Treaty of Westphalia in 1648, Switzerland attained legal independence from the Holy Roman Empire. The Valtellina became a dependency of the Drei Bünde again after the Treaty and remained so until the founding of the Cisalpine Republic by Napoleon Bonaparte in 1797. In 1653, peasants of territories subject to Lucerne, Bern, Solothurn, and Basel revolted because of currency devaluation. Although the authorities prevailed in this Swiss peasant war, they did pass some tax reforms and the incident in the long term prevented an absolutist development as would occur at some other courts of Europe. The confessional tensions remained, however, and erupted again in the First War of Villmergen, in 1656, and the Toggenburg War (or Second War of Villmergen), in 1712. Napoleonic period and aftermath (1798–1848) French invasion and Helvetic Republic During the French Revolutionary Wars, the French army invaded Switzerland and turned it into an ally known as the "Helvetic Republic" (1798–1803). It had a central government with little role for cantons. The interference with localism and traditional liberties was deeply resented, although some modernizing reforms took place. Resistance was strongest in the more traditional Catholic bastions, with armed uprisings breaking out in spring 1798 in the central part of Switzerland. The French Army suppressed the uprisings but support for revolutionary ideas steadily declined. The reform element was weak, and most Swiss resented their loss of local democracy, centralization, new taxes, warfare, and hostility to religion. Major steps taken to emancipate the Jews included the repeal of special taxes and oaths in 1798. However, the reaction took place in 1815, and not until 1879 were the Jews granted equal rights with the Christians. In 1803, Napoleon's Act of Mediation partially restored the sovereignty of the cantons, and the former tributary and allied territories of Aargau, Thurgau, Grisons, St. Gallen, Vaud, and Ticino became cantons with equal rights. Napoleon and his enemies fought numerous campaigns in Switzerland that ruined many localities. Restoration and Regeneration The Congress of Vienna of 1814–15 fully re-established Swiss independence and the European powers agreed to recognize permanent Swiss neutrality.