The church was built from the 8th century on the hill known as Cerro de Somorrostro, surrounded by water, where the Roman settlement of Portus Victoriae Iuliobrigensium had previously been located, in order to keep safe the relics of the saints martyred in Calahorra five centuries before, when their skulls were brought to Santander by those escaping the Muslim invasion of the Iberian Peninsula.
The main portal, constructed around 1230, is of special interest, as it contains the first known carved coat of arms showing lions and castles together, after the final unification of Castile and León in the time of Fernando III, whose son, Sancho, was abbot here.
It suffered considerable damage as a result of the enormous dynamite explosion on the steamship Cabo Machichaco in the harbour in 1893.
After surviving the Spanish Civil War, it suffered serious damage in the Santander Fire of 1941, and needed extensive reconstruction and repair from 1942 to 1953, when it was reopened.
The respectful restoration performed on the affected parts today permits the appreciation of the architectural qualities of the original monument.
Due to the reconstruction project, many important Baroque elements were suppressed that had formed an extension to the church and were the work of José de Cereceda dating from the 18th century.
In order to build these new elements, the stone choir that had survived the fire, the Martyrs' Door and the monumental stairs had to be removed.
The old collegiate church consisted of three naves, with a fourth one being added from the space formerly occupied by the abbot's palace and other chapels.