Starting around 1100, Morcote was home to a castle that was built to guard and control commerce on the lake. Until the dam was built in Melide in 1847, Morcote was the largest port on Lake Lugano. Goods from northern Italy were shipped across the lake to the rest of Ticino. In 1422 the town was granted privileges by the Duke of Milan, which included the rights to impose taxes, self-government, independent fishing and the right to hold markets. After the plague year of 1432, only seven families survived in the town. The town was often caught between the rival powers of Milan and Como as they fought for control in Lombardy. In 1517 the region came under the control of the Old Swiss Confederation, and was added to the Vogtei of Lugano. However Morcote retained extensive rights, including judicial and tax autonomy as well as fishing rights over the entire lake.