This is one of the most important Spanish Romanesque buildings. It was built in the 12th century on the initiative of the count Martín Fernández on the site of a chapel dedicated to San Pedro. It has a rectangular floor plan with three naves and three apses. The outside features a Romanesque southern doorway which is decorated with archivolts. One of the three niches features a relief depicting Saint Martin sharing his tunic with a poor man. Inside, notable features include the quire, numerous tombs (including that of Diego de Santiesteban), and the main altarpiece, the work of Churriguera, produced in 1731.