The first reference to a monastery or religious institution came from a papal brief to
Pope Leo IV (in 853). Its founding would not occur until 13 July 1059 by
Dom Gomes Aciegas, and completed 1102; the remains of this original construction are two small chapels (below the main altar), the mail entrance door and the four fortified arches. On 6 March 1586, the monastery's rich patrimony was taken by King
Philip I of Portugal and transferred to the
Jerónimos Monastery. But, this did not limit the growth of the church and monastery, as major projects continued between the 16th and 18th century, with Jerónimo Luís being the principal contractor in 1600 constructing the two exterior towers. One of the wings of the cloister were completed in 1702 (from descriptions made by Craesbeeck in 1725). It was followed in 1719 by the construction of the new choir in the principal wall, the displacement of the rose window from the portico to the bell towers. Continued remodelling in 1722 caused the destruction of the Romanesque main chapel in 1722. The main organ was expanded in 1743, as a prelude to the execution of a new organ on 30 April 1767 by Francisco António Solha, which included gilding and the import of various mechanisms (at the total cost of 900$000
réis, not including 135$000 réis pipes. In successive years, the organ would be renovated: first in 1786, then 1801, before the pipes were stolen in the 20th century. Between 1770-1773, the
retable was completed by friar José de Santo António Ferreira Vilaça, who also designed, the flourishments along the choir, the rosewood
pews and the four chapels. Friar José later completed two lateral retables between 1774–1777, while two other retables were completed after him (1777–1780) by José Vilaça. Ironically, by 1785, the church and monastery was practically painted. After the 19th century, the church and monastery were progressively falling into ruin, after the Benedictine monks were expelled in 1834, and a significant part of the altar and construction stone were removed to support other projects within the region. Since 1910, the monastery has been considered a National Monument. In January 1997, the Ministry of Culture () purchases the building and one of the parcels around the monastery (the consisted of a house and three lots). Throughout the
Estado Novo regime the monastery was recovered in tiles, first beginning in 1958, then in 1960, 1961, 1962, 1963, 1969, which also included renovations to: the
cupola, the lateral naves, the vaulted ceilings, and cloisters, in addition to the renovation of the bell-towers and sacristy (which was in fear of collapse). Similar public works were undertaken under the democratic governments after the
Carnation Revolution. These repairs included projects to protect and renovate the damage caused by water drainage (1987), recuperation of the principal façades of the church and monastery, the high-choir, bell-towers and restoration of the first-floor oratory of the monastic residences, in addition to archaeological projects in 1997-1999. ==Architecture==