S. Maria in Trastevere originated as an aisled basilica erected by Pope Julius I (337-352) on the intramural via Aurelia, adjoining an object or building associated with Pope Calixtus I (217-222). Known as the titulus sancti Iulii et Calisti, it was dedicated to Mary in the sixth century. By the eighth century it was the home of a miraculous icon, the Madonna della Clemenza. Pope Gregory IV (827-844) added a monastery and a praesepium in imitation of the one in S. Maria Maggiore. Abbot Anastasius Bibliothecarius (858 ff.) identified the church as the site of the ancient fons olei. Following a reform of the monastery, the church was dedicated by Pope Alexander II in May 1065. A doorframe carved with inhabited vine scrolls (now at the end of the right aisle) may have been made at that time. In 1130 the basilica’s titular cardinal, Peter Pierleoni, was elected pope (as Anacletus II) simultaneously with Cardinal Gregory of Sant’Angelo (Innocent II), creating a schism. After Anacletus died in 1138, Innocent II condemned his every act and had his altars destroyed. In 1140 he razed the antipope’s title church and replaced it with a grander basilica on the same foundations, which was not quite complete when he died in 1143. It was consecrated by Pope Innocent III in 1215. Innocent II’s church is a large non projecting transept basilica (L 53 m X W 26.3 m) with two aisles, a bell tower, and (originally) a trabeated porch. It is notable for the extravagant display of ancient spolia around its portals and in the colonnades. The apse conch mosaic, the altar and ciborium, paving in the transept, and four Ionic capitals in the nave colonnades date to the 1140s. The nave pavement and the schola cantorum may have been made between ca. 1150 and ca. 1225, and the cathedra is datable to the 1240s/1250s. The façade mosaic was executed in phases between ca. 1250 and ca. 1300, and the mosaics under the conch were made by Pietro Cavallini just before 1300. Renovations sponsored by Cardinal Altemps (1580-1595), Cardinal Aldobrandini (1612-1620), and Pope Pius IX (1864-1873) obliterated the original fenestration, the wooden truss roofs, and the pavements of the nave and aisles. The porch was demolished and rebuilt by Carlo Fontana in 1701.