Erected near to Córdoba by 'Abd al-Rahman III, the palatine city of Madinat al-Zahra' was the residence of the caliph and his court. The Aljama Mosque was the fist building being concluded, around 941, and was one of the most important for social and religious concerns.