For three centuries, Córdoba was the centre of Muslim power in the Iberian Peninsula until it was taken by Fernando III in 1236 during the Spanish Reconquista. The Mezquita, the former Great Mosque, was first built between 785 and 787 AD. Its more than 850 columns of granite, jasper and marble that support the roof were recycled from Roman and Visigoth ruins. Over the centuries, the mosque was expanded and embellished. After the Reconquista, a cathedral was built within the mosque and reconsecrated as a Christian place of worship. The provinces of Córdoba and Granada remain at the heart of Moorish Spain.