three great feudal families of capitanei, the Muralto and the Orelli families, left the town and moved to Zürich. A branch of the Muraltos was established in Bern. The third great Locarno family, the Magoria, remained in Locarno. The capitanei retained a central role in Locarno's politics until 1798. In 1803, the lands and rights of the capitanei were integrated into the political municipality of Locarno. Early Locarno Starting in the Lombard period (after 569), the area around Locarno (and presumably the town) was part of the county Stazzona and later the Mark of Lombardy. Locarno is first mentioned in 807 as Leocarni. In German, it came to be known as Luggarus, Lucarius, Lucaris. It is likely that a market existed at or near the lake since the Roman era. The long history of the town and its location led to the creation of a royal court, which is first mentioned in 866. During the Middle Ages Locarno and Ascona formed a community, with several, separate neighbourhoods. The community managed its common goods (alpine pastures, pastures, forests, churches) and tax officials and police. In the 10th century, Bishop of Milan began to consolidate more and more power to himself at the expense of the Kings of the Germans. This expansion by Milan was countered by Henry II, who incorporated Locarno in 1002/04 with the surrounding areas into the Diocese of Como. Friedrich Barbarossa granted extensive market rights to Locarno in 1164 and granted imperial immediacy in 1186. Due to these privileges, Locarno developed substantial local autonomy, which assisted the development of municipal institutions. The nobles (Nobili) lost more and more rights to the citizens (borghesi). By 1224, the borghesi had their own administration and various privileges, including: market rights, the right to their own weights, maintenance of mills and grazing rights in Saleggi, in Colmanicchio (Alp Vignasca) and in the Magadino and Quartino valleys. Locarno was the administrative centre of the parish of Locarno. The Podestà or high government official, resided in the Casa della Gallinazza, which was burned in 1260 during the clashes between the Guelphs and Ghibellines. Several Locarno families, including members of the Capitanei di Locarno and Simone da Orello, played an important role in the battles between the two factions. In 1342, Luchino and Giovanni Visconti conquered the area, which brought Locarno back under the power of Milan. In 1439, Count Franchino Rusca was awarded Locarno