It is believed that in the 6th century, the Castle of San Michele was the site of a curia (court) and the seat of a "sculdascio" (Lombardic for officer) of the county of Stazzona, who exercised control over the entire parish of Locarno. In 1004, the court rights were transferred from the Archbishop of Milan to the Bishop of Como. In 1189 this gave the castle of San Michele to the Duni, one of the families of the "Capitanei di Locarno". Other noble families from Locarno (Da Carcano, Castelletto, Muralto) settled in Ascona. They were joined by the Griglioni that fled the wars between the Guelphs and Ghibellines of Milan. In the 12th and 13th Centuries, the Duni enlarged their fortress (demolished in the 17th century) and the church of S. Sebastiano as well as created a plaza around their residential building. The oldest fortification, probably, is the castle of San Materno. At its location, north of the village, there already seems to have been a Roman tower. The fort was occupied as early as the Early Middle Ages. In the 13th century, it was owned by the Orelli and Castelletto families. In the 17th century, only a part of the walls were still preserved. In the course of the 13th century, two new fortifications were built. The first was the Carcani Castle on the shore east of the Church of SS. Pietro e Paolo, and it was already demolished in the 2nd half of the 13th century. The second, was still further east, outside the inhabited area at that time. The Griglioni built a small castle to protect a port. Parts of this castle still exist and have been integrated into modern buildings. A church is first mentioned in 1264 and was originally consecrated only as the Church of S. Peter. The Church of SS Peter and Paul is first mentioned as a parish church in 1330, and in 1332 as a collegiate church. However, no documents exist which show the separation from the mother church of San Vittore in Muralto and thus the existence of an early medieval parish. The Church of S. Maria della Misericordia was built in 1399–1442. It contains one of the most extensive late Gothic fresco cycles in Switzerland.