The palaces housed the caliph's household, including a large number of concubines. The residents were served by a large body of slaves, including eunuchs, of mostly European origin. The city also contained a throne hall or audience chamber (the Salón Rico), government offices, workshops that produced luxury objects, the residences of high officials, and – on the lower levels of the city – markets and residential districts for the common workers. The city had a manager, a judge, and a police chief. Under the cultured caliph Al-Hakam II in particular, there was also a library which by some accounts contained hundreds of thousands of volumes in Arabic, Greek, and Latin. The main mosque (also known as the Aljama Mosque), and one or more small neighbourhood mosques, provided religious services.
