The earliest records of the castle date back to the 9th century. The square structure is made from cobblestones from the river, squared off stone blocks and brick. It was built around what was presumably a Roman tower and bears the coat of arms of the Viscontis. Conquered and partially demolished in the 13th century, it was rebuilt and passed in 1569 to the Gallarati family with jurisdiction over the entire area, before becoming property in 1591 of the Piacentino family Landi. The complex is laid out around a large square courtyard with a portico wing at the end showing a cove with circular windows, added in the 16th-17th century when the castle was transformed into a manor house. It now looks as it did in the 14th century thanks to restoration work carried out in 1922 by the architect Carlo Bonomi. The manor house was once a strategic base of the Visconti family and is now a private residence so it cannot be visited. Access is by means of the steep via della Chiesa or else the flight of steps leading from via Vittorio Veneto directly to the terrace. From here there is a marvellous panorama over the town and surrounding countryside. There is also a magnificent park.