 Due to its importance, Sonvico obtained a privilege status from the Duchy and was thus allowed to set many of its own laws enjoying tax and customs exemptions.The first book of law known as "Libbro degli Statuti della Magnifica Comunità di Sonvico" dates from 1473.During the Italian War of 1499–1504 the Swiss took power over the Ticino region and The Castellanza was officially annexed by the Old Swiss Confederacy into their occupied territories in 1512.