It is said that James I of Aragon vowed to build this cathedral when he ran into troubled waters on his way to Mallorca. He promised that if he landed safely and conquered the island, he would dedicate the church to the Virgin Mary. Construction actually began after his death in 1229 on the site of a Moorish-era mosque and also atop the former citadel of the Roman city, previously called Palmeria. It took over 400 years to finish, was later added to by Gaudà in the early 20th century, and remains the most impressive and recognized architectural gem on the island.