The first certain testimony of a political body governing the shores of the lake is from 818. Occupying an area of strategic importance, the lake was then part of the feudal dominion of the County of Sperio. Circa 1000, it came under the control of the Bishop of Como. The region was the site of the war between Como and Milan over control of Alpine traffic from 1218 to 1227. As the lake and its shores became progressively incorporated into the Duchy of Milan they became the subject of political and territorial contention during the 15th century, and Lugano became the lake's main town.