Andalusian city with a cathedral (the Mezquita) that was formerly a mosque (7)
I believe the answer is:
cordoba
(Other definitions for cordoba that I've seen before include "Moorish city" , "spending unit in Nicaragua" , "money for the Contras" , "City in southern Spain and Spanish explorer" , "ready for Nicaragua?" .)