A legend is also connected to the origin of the church: the daughter of a blind woman, while guarding her geese browsing along the border of the Ditch of San Pietro, saw a stately Lady under the sun. With her feet resting on the branches of a sambuco tree, she asked the girl if she could please ask her mother to fetch a mat to cover herself from the sun rays; the blind woman came carrying the mat, and "saw" the lady. In memory of the miracle, she had a wall built on the spot, and on it the apparition was painted. Devotion kept growing, and on the wall a crypt was first erected and later the whole church.
The church was possibly built in the early 12th century, as can be seen from an inscription in a stone outside the church that reads
"CONTESA MATELDA HOC OP FF
M.C.XVII DIC."
(= Countess Matilda had this work done in 1117). This countess may actually be Mathilda of Canossa, who died 2 years before 1117.