The church was started in 1238 by the first bishop of Valencia Pere d'Albalat . The church was consecrated in 1238 by the first bishop of Valencia after the Reconquista , Pere d'Albalat , Archbishop of Tarragona , and was dedicated by order of James I the Conqueror to Saint Mary .