The first documentary reference to Santa María de Piasca is a donation from 930 making reference to a basilica just founded on the site. Little over a decade later, in 941, an agreement was recorded between 36 nuns and an unknown number of monks under an abbess Aylo, telling us that the monastery housed a community of both sexes. The monastery's dual character faced several oscillations, with the nuns leaving and returning twice. The archeological evidence of the original monastic buildings shows a small single nave church and separate spaces for the two groups.
A foundation stone records that the current church on the site, the Romanesque edifice, was dedicated in 1172 under a prior Petrus Albus. By this point the monastery had been incorporated into the larger Cluniac monastery of San Facundo y Primitivo de Sahagún (in 1122) and brought under the Benedictine Rule. The inscription also names the master of the project as Covaterio. The church has two sculpted portals, the west and the south. The portals have most likely been somewhat reconstructed, possibly with elements exchanged between the two. The triple arcade on the west façade has obviously been renovated as the central sculpture of Mary is from the sixteenth century. The two apostles (Peter and Paul) to her sides may have originally flanked an image of Christ, forming, as Ruth Bartal suggests, an abbreviated apostolado.
References:Visby Cathedral (also known as St. Mary’s Church) is the only survived medieval church in Visby. It was originally built for German merchants and inaugurated in 1225. Around the year 1350 the church was enlarged and converted into a basilica. The two-storey magazine was also added then above the nave as a warehouse for merchants.
Following the Reformation, the church was transformed into a parish church for the town of Visby. All other churches were abandoned. Shortly after the Reformation, in 1572, Gotland was made into its own Diocese, and the church designated its cathedral.
There is not much left of the original interior. The font is made of local red marble in the 13th century. The pulpit was made in Lübeck in 1684. There are 400 graves under the church floor.