 In the Middle Ages it was contested between powerful families from Como and Milan, but was able to maintain its status as a free commune.As part of the Duchy of Milan, it was acquired by Spain in the early 16th century and, in 1541, king Charles V gave it right to hold a market in alternance with Maccagno, who had been enjoying it alone so far.The concession was confirmed in 1786.