The church of Santa Maria foris portas is located in the municipality of Castelseprio in the province of Varese. On a rise two hundred meters away from the city walls of an ancient castrum, hence its medieval Latin appellation. It is the only building that survived the destruction and abandonment of the ancient fortified village, thanks to the devotion attached to the place of worship.
Externally the church has a rustic simplicity, preceded by an atrium with a large archway, opened in the 17th century. In plan it has a single rectangular nave, not very long, with an apse on each side beyond the entrance. The three apses are equal to each other except for the arrangement of the windows. Archaeological investigations have shown that the church, which perhaps arose as a noble oratory, had no buildings nearby, except for the small quadrangular structure, perhaps a sacristy, of which traces remain between the central and southern apse.
Numerous, on the other hand, tombs, including those of a certain commitment (from one comes the large slab with a cross preserved under the portico of the Antiquarium), found both inside and outside the building.
In the central apse is preserved a cycle of frescoes with episodes from the infancy of Jesus inspired by both canonical and apocryphal gospels, particularly the Proto Gospel of James and the Gospel of Pseudo-Matthew. The lower part of the wall was adorned with a painted curtain (velarium) and birds, while the narrative cycle, arranged in two registers, begins at the upper left with The Announcement of the Angel to Mary and Mary’s Visit to Elizabeth. After a wide lacuna, in which there was probably a clypeus (circular image), the narrative continues with the apocryphal episode of the test of the bitter waters, which Mary is forced to drink to prove her virginity. In the center of the apse is a clypeus with Christ pantokrator ("Lord of all things"). The narrative continues with the appearance to Joseph of an angel who reassures him of Mary’s divine motherhood. After another clypeus (traces of which are preserved), Mary and Joseph’s journey to Bethlehem is depicted and, at the far right of the lower register, the birth of Jesus and the annunciation to the shepherds. The next episode, namely the adoration of the magi, is on the adjacent wall, while the last of the preserved episodes, the presentation of Jesus to the Temple, is again on the curved wall after the window. On the inner wall of the arch that separates the apse from the nave is depicted, in the center, the Etoimasia (Greek for "preparation"), which consists of a throne ready to welcome Christ on his return. Toward the throne, on which rests a crown and cross, fly two angels.
The dating of the church and frescoes is highly controversial. There is a tendency today to date the building in the 7th/8th century, and the frescoes between the 7th/8th and early 10th centuries.