According to Byzantine historian Andrew Ekonomou, the church was founded in the 6th century during the Byzantine rule of the city and was placed in the centre of the Greek community in Rome. The Greek part of the city was referred to as the 'Schola Graeca'. The church was dedicated to the Virgin Mary, who was greatly adored as Theotokos in contemporary Constantinople. The name 'Cosmedin' came from the Latinization of the Greek word κοσμίδιον that derives from the Greek word κόσμος, which means pure or elegant. The church was built in the 8th century, during the Byzantine Papacy, over the remains of the Templum Herculis Pompeiani in the Forum Boarium and of the Statio annonae, one of the food distribution centres of ancient Rome. A deaconry was a place where charitable distributions were given to the poor, and it is appropriate that such an institution would have been built near or at a station of the Roman annona. An eighth century inscription in the church records that Eustathius, the last Byzantine duke of Rome gave a gift of extensive properties to the church's ministry to the poor. The same inscription also mentions a donation by someone named Georgios and his brother David Since it was located near many Byzantine structures, in 7th century this church was called de Schola Graeca, and a close street is still called della Greca. Greek monks escaping iconoclastic persecutions decorated the church around 782, when pope Adrian I promoted its reconstruction; the church was built with a nave and two aisles and a portico. Because of its beauty, the church received the adjective cosmedin, ornate. A sacristy and an oratory dedicated to St. Nicholas were added in the 9th century, by order of Pope Nicholas I, who also built a papal residence, but they were destroyed in the Sack of Rome by Robert Guiscard's Norman troops. Santa Maria in Cosmedin was the titular church of Popes Gelasius II and Celestine III, as well as antipopeBenedict XIII. Among the former titular cardinal deacons of the church was Reginald Pole, the last Roman Catholic Archbishop of Canterbury. The inscriptions found in S. Maria in Cosmedin, a valuable source illustrating the history of the Basilica, have been collected and published by Vincenzo Forcella. A substantial restoration was accomplished in 1118–1124 under Alfanus, camerarius of Pope Callixtus II. After being acquired by Benedictines and a period of decay, in 1718 the church was refurbished in the Baroque style, particularly by a new façade, by Giuseppe Sardi. The Baroque additions, however, were removed in the restoration of 1894–1899, together with the coat-of-arms of Pope Clement XI who had sponsored Sardi's work.
Architecture
In the portico of the church, on the north side, can be found La Bocca della Verità, an ancient sculpture thought to be a drain covering. A legend states that, if a person places his hand inside the mouth and then swears falsely, the mouth will close and sever the hand. There is no attested case of such an event taking place. The church's bell tower is the tallest medieval belfry in Rome. The current interior of S. Maria in Cosmedin has a nave with two aisles: these are divided by four pilasters and eighteen ancient columns. Built into the side walls, some of the old columns of the Statio Annonae are visible. Other fragments of the ancient building can be seen in the crypt. Paintings from the 8th-12th centuries, in three layers, are preserved in the upper part of the nave and in the triumphal arch. The church has a very fine Cosmatesque pavement. The schola cantorum is from the 13th century, while the main altar is a red granite piece from 1123. The Easter candelabrum is also from the 13th century. The sacristy houses a precious 8th-century mosaic fragment brought here from the Old St. Peter's Basilica. Of the 18th-century restoration, the Crucifix Chapel and the Baptistry can be seen today. In a side altar on the left of the church is kept the flower crowned skull attributed to St Valentine.
A scene from the 1953 romantic comedy movieRoman Holiday was filmed in Santa Maria in Cosmedin. In the scene, "Joe" played by Gregory Peck shocks the "Anya/Princess Ann" played by Audrey Hepburn by pretending to lose his hand in the Bocca della Verità. Likewise it was depicted as the church inside the unnamed abbey in 2019 mini-series adaptation of the novelName of the Rose.