In the 11th century it functioned as a "family monastery" for the royal family of Aragon. Female members of the family ruled the monastery from within while family members outside the monastery patronised it. The date of Santa María's foundation is unknown. It is first mentioned in a document of 1070. In that document, Sancha de Aibar, mother of King Ramiro I, grants some land to Ramiro I's daughter Sancha on the condition that she leave them to the nuns of Santa María on her death. Although there is no earlier reference to the nunnery, it appears to have been in existence for some times, since it had both an abbess, Menosa, and a church building at the time of Sancha's grant, since the document itself was drawn up "in the atrium of Santa María, before the abbess Lady Menosa". In her will of 1095, the younger Sancha specifies that her bequest should go to "the workshop of the church for Santa María". Besides Sancha, Ramiro I's other two daughters, Teresa, his eldest who never married, and Urraca, who may have been married to Count William Bertrand of Provence, both made donations to Santa María before entering it as nuns. In a document dated 15 March 1061, Ramiro I commends his daughter Urraca to the abbess and nuns of Santa María, but this document is probably a forgery. Urraca seems to have entered the nunnery towards 1070. Ramiro I's daughter-in-law, Felicia, wife of King Sancho Ramírez, donated an evangelary to the nunnery. It is now lost, but either of two surviving silver-gilt plaques incorporating some Byzantineivories is thought to have been its book cover. The covers, one of which bears Felicia's name, now reside in the Metropolitan Museum of Art in New York. Both may have at one time belonged to Santa María.
Architecture
The nuns' church, which was at least under construction in the late 11th century, is one of the earliest buildings in Aragon in the Romanesque style. The plan of the small church, which is the only building of the complex that still stands, is that of a Latin cross. The exterior is ashlar masonry. The interior has sculpted capitals and intricate mouldings. The nave is barrel-vaulted with a semicircular apse. The south arm of the transept has a high tower with a dome on squinches. The bunched and massive look of the church probably stood out less when it was merely the central building among many, but today it stands alone. Many of the architectural elements have traces of polychrome: they were once painted in bright colours. The tympanum has a carved chrismon and two lions reminiscent of the tympanum of the cathedral of Jaca, which was the original capital and royal city of Aragon. There is an unusual octagonal "secret" chamber above the crossing with a ribbed dome-shaped vault that can only be reached through a steep stairway buried in the thick south wall of the nave, which stairs can only be accessed through a small door set high in the wall. This room may have been the abbess's quarters or perhaps a chamber for the nuns to hide in in the event of danger. The corbel on the west wall of this room was carved by the same master who carved the sarcophagus of Ramiro I's daughter Sancha. In 1490, a large reredos centred around an alabaster sculpture of the Virgin Mary was added by the holy water font. Several capitals rescued from the now lost cloisters were relocated to the area by the font as well.