The vizier stood between sovereign and subjects, representing the former in all matters touching the latter. The 11th-century legal theorist al-Mawardi defined two types of viziers: "wazīr al-tanfīdh" ("vizier of execution"), who had limited powers and served to implement the caliph's policies, and the far more powerful "wazīr al-tafwīd" ("vizier with delegated powers"), with authority over civil and military affairs, and enjoyed the same powers as the caliph, except in the matter of the succession or the appointment of officials. Al-Mawardi stressed that the latter, as an effective viceroy, had to be a Muslim well versed in the "Shari'a", whereas the former could also be a non-Muslim or even a slave, although women continued to be expressly barred from the office.