The federal troops during the Sonderbund war
In 1847, the period of Swiss history known as Restoration ended with the breaking out of a war between the conservative Roman Catholic and the liberal Protestant cantons (the Sonderbundskrieg). The conflict between the Catholic and Protestant cantons had existed since the Reformation; in the 19th century the Protestant population had a majority. The Sonderbund (German: separate alliance) was concluded after the Radical Party had taken power in Switzerland and had, thanks to the Protestant majority of cantons, taken measures against the Catholic Church such as the closure of monasteries and convents in Aargau in 1841. When Lucerne, in retaliation, recalled the Jesuits the same year, groups of armed radicals ("Freischärler") invaded the canton. This caused a revolt, mostly because rural cantons were strongholds of ultramontanism.
The Sonderbund was in violation of the Federal Treaty of 1815, §6, which expressly forbade such separate alliances, and the Radical majority in the Tagsatzung decided to dissolve the Sonderbund on 21 October 1847. The confederate army was raised against the members of the Sonderbund, composed of soldiers of all the other states except Neuchâtel and Appenzell Innerrhoden, which had stayed neutral. Ticino, while a Catholic canton, did not join the Sonderbund and fought with the Protestants.
The war lasted for less than a month, causing fewer than 100 casualties. Apart from small riots, this was the last armed conflict on Swiss territory.
At the end of the Sonderbund War, the Diet began to debate a new federal constitution drawn up by Johann Conrad Kern (1808–1888) of Thurgau and Henri Druey (1790–1855) of Vaud. In the summer of 1848 this constitution was accepted by fifteen and a half cantons, with Uri, Schwyz, Unterwalden, Valais, Ticino and Appenzell Innerrhoden opposing. The new constitution was declared on 12 September 1848.