According to several authors, the Romanesque church of Santa María was built on the former site of the mosque described by al-Himyari: “The beams that support the central nave of the main mosque are 11 palms long, square-shaped, finely cut and with equal sides.”
The church of San Andrés stood in the town square, next to an inn, and comprised a single nave. When the new church was built in 1577, the parishes of Santa María and San Andrés were merged into one.
The present-day church was named Santa María in 1801 following a decree by Bishop Antonio Palafox y Croy. During the Peninsular War, the chapel dedicated to the town’s patron saint, Our Lady of Sorrows, was destroyed and the statue was therefore transferred to this church.
In 1905, the building was demolished and the parish moved temporarily to the monastery until the chapel was completed in 1907.
The building we see today dates from 1967 and is a functional design with a single nave. The only parts that have been preserved from the former church are the exterior walls and the base of one of the columns, which today serves as the base for the lamppost in the centre of the square.