The church is of late Romanesque origin, with a basilica plan with three naves and an apse at the chancel. It also has some later Gothic influences. The main doorway and its tympanum are of great importance.
The chapel was built mostly with alms, and Alfonso X gave it the privilege of parish church in 1256.
In 1302, its first extension was undertaken, the construction of its three naves, work on which was completed in 1317. It was erected as a collegiate church in 1441 by a papal bull confirmed by Eugenio IV on 13 April 1443, at the request of the archbishop of Santiago, Don Lope de Mendoza.
The current appearance of the temple was configured in 1889, the year in which Juan de Ciórraga began work that remained unfinished. With this work, the three bays of the nave were extended, the doorway was moved forward, the choir was moved and the new façade was built, as the old one had been demolished.
Two new alterations were carried out in the 20th century, the first supervised in 1946 by the architects Sorolla and Menéndez-Pidal; the last restoration to date dates from 1980.
In 1931 it was declared an Asset of Cultural Interest.