In Gothic times, it seems to have been dedicated to the Holy Saviour; the Cid dedicated it to the Blessed Virgin; King James I of Aragon did likewise, leaving in the main chapel the image of the Blessed Virgin, which he carried with him and is reputed to be the one now preserved in the sacristy