of the Helvetic Republic, the Act of Mediation, in 1803, created the Canton of Ticino with Locarno as an independent municipality. The Helvetic Republic was very liberal and attempted to reform much of Swiss society. However, the changes were too great and the Republic collapsed. The compromise Act of Mediation changed some aspects of society but left others unchanged. The new municipality of Lucarno was no longer ruled by three different patriziati, which had emerged from the three groups (nobles, borghesi and terrieri), but until the mid-19th century there were institutions that reached back to the Ancien Régime. For example, the community of Locarno and Ascona was dissolved in 1805. Nevertheless, a "committee of the representatives of the former communities of Locarno" managed, for several decades, the S. Carlo Hospital and schools, which had been shared by the patriziati of the old, combined community. However, the power of the old patriziati gradually weakened. In 1859, the terrieri decided to set aside their corporation. The nobles corporation distributed its assets in 1866–67 to its members and dissolved the archive, but retained until about 1920, the fishing rights. Only the citizens' corporation has preserved its status as a civil community. The Constitution of 1814, established Locarno, Bellinzona and Lugano as the capitals of the canton, in a six-year rotation. Locarno was the capital of the canton in 1821–27, 1839–45, 1857–63 and 1875–81. In 1838–39, on the initiative of a group of notables, a government building was built. It was sold in 1893 to a private company. It then became the headquarters of Credito Ticinese and since 1917 it has been the headquarters of the Electricity Company of Sopraceneri. Locarno was repeatedly the scene of political clashes. In 1839 and 1841, uprisings against the government broke out. In 1855, a murder in a coffee house was used as a pretext for a coup of radicals (pronunciamento). Another coup, the Ticino coup of 1890, did nothing to change the balance of power between the parties in the city. After a liberal mayor ruled for 35 consecutive years (1865–80), a conservative mayor ruled for another 36 years (1880–1916). To break the conservative hegemony of the late 19th century, the Social Democrats, allied with the Liberals in 1916 elections. They succeeded to a majority in the city government (which then consisted of nine members, but in 1987 was limited to seven), which they kept in the