In 1798 Napoleon invaded the Old Swiss Confederation, destroying the Ancien Régime. Under the Helvetic Republic both the abbey and the city lost their power and were combined with Appenzell into the Canton of Säntis. The Helvetic Republic was widely unpopular in Switzerland and was overthrown in 1803. Following the Act of Mediation the city of St. Gallen became the capital of the Protestant Canton of St. Gallen.