The work of building the resplendent Mezquita employed thousands of artisans and labourers, and such a vast undertaking led to the development of all the resources of the district. Hard stone and beautifully veined marble were quarried from the Sierra Morena and the surrounding regions of the city. Metals of various kinds were dug up from the soil, and factories sprang up in Córdoba amid the stir and bustle of an awakened industrial energy. A famous Syrian architect made the plans for the Mosque. Leaving his own house on the edge of Córdoba, the Emir came to reside in the city, so that he might personally superintend the operations and offer proposals for the improvement of the designs. Abd al-Rahman moved about among the workers, directing them for several hours of every day.The mosque underwent numerous subsequent changes: Abd al-Rahman II ordered a new minaret, while in 961 Al-Hakam II enlarged the building and enriched the Mihrab. The last of such reforms was carried out by Almanzor in 987. It was connected to the Caliph's palace by a raised walkway, mosques within the palaces being the tradition for previous Islamic rulers – as well as Christian Kings who built their palaces adjacent to churches. The Mezquita reached its current dimensions in 987 with the completion of the outer naves and courtyard.