I am currently in cordoba and as of writing i have visited the cathedral/mosque/museum. It used to be an area conquered by muslims invaders (possibly moors) who leveled the cathedral and other building sorrounding the are and built a mosque over it eventually the mosque was taken in 1233 after the successful investment by king ferdinand iii.