The canton of St. Gallen or St Gall ( ; ; ; ) is a canton of Switzerland. The capital is St. Gallen. Located in northeastern Switzerland, the canton has an area of (5% of Switzerland) and a resident population close to half a million as of 2015 (6% of Switzerland). It was formed in 1803 as a conflation of the city of St. Gallen, the territories of the Abbey of St. Gall and various former subject territories of the Old Swiss Confederacy. History The canton of St. Gallen is an artificial construct of various historical territories, defined by Napoleon Bonaparte in the Act of Mediation in 1803. About half of the canton's area corresponds to the acquisitions of the abbey of St. Gallen over centuries. The city of St. Gallen became independent of the abbey in 1405. At the same time, the abbey lost control of Appenzell. Conversely, the Toggenburg was acquired by the Abbey in 1468. Both the city and the abbey were associates (Zugewandte Orte) of the Old Swiss Confederacy, but unlike Appenzell never joined as full members. The territories at Lake Zürich, Walensee and Rheintal remained independent until 1798. In the Helvetic Republic, the northern parts of the modern canton together with Appenzell became the canton of Säntis, while its southern parts together with Glarus became the canton of Linth. Before the 1798 French invasion, the territory of the modern canton consisted of the free city of St. Gallen, the territories of the Abbey of St. Gallen (including Fürstenland and Toggenburg), the free city of Rapperswil, Pfäfers Abbey, Sargans and the independent lordships (bailiwicks) of Rheintal, Sax-Forstegg, Hohensax, Werdenberg, Windegg and Uznach. In April 1798, the territories of the later canton of St. Gallen were divided between the cantons of Säntis and Linth of the Helvetic Republic (along with Appenzell, Glarus and parts of Schwyz. However, the two new Cantons had immediate financial problems and were forced to institute a number of unpopular taxes and laws. The Abbey was secularized on 17 September 1798 and the Prince-Abbot Pankraz Vorster fled to Vienna. The unpopular laws and the closing of the Abbey caused unrest throughout the area. When the War of the Second Coalition broke out in 1799, an Austrian army marched into eastern Switzerland and returned the Prince-Abbot to his throne at the Abbey. However, his victory was short-lived. The Austrian and Russian armies were defeated