The historic building in Southern Spain serves as a cathedral and was originally built as a mosque between the 8th and 10th centuries by Muslim ruler Abd ar-Rahman, before being converted into a cathedral in the 13th century.