▁and ▁early ▁Abb as id ▁periods , ▁up ▁to ▁the ▁early ▁ 9 th ▁century , ▁most ▁of ▁the ▁occup ants ▁of ▁the ▁office ▁were ▁still ▁ma w ā l ī . ▁During ▁this ▁time , ▁the ▁ha j ib ▁ ▁still ▁occupied ▁a ▁lower ▁r ung ▁in ▁the ▁court ▁hierarchy ▁than ▁the ▁Arab ▁arist ocracy ▁or ▁the ▁great ▁minister s ▁of ▁state . ▁His ▁main ▁duties ▁were ▁those ▁of ▁a ▁master ▁of ▁cer emon ies , ▁organ izing ▁and ▁super vis ing ▁cal i phal ▁aud ien ces , ▁and ▁bringing ▁visitors ▁to ▁the ▁cal i ph ' s ▁presence . ▁He ▁was ▁also ▁head ▁of ▁the ▁palace ▁staff , ▁and ▁might ▁sometimes ▁be ▁employed ▁by ▁the ▁cal i ph ▁as ▁a ▁trust ed ▁agent ▁in ▁elimin ating ▁certain ▁of ▁the ▁cal i ph ' s ▁subjects . ▁ ▁With ▁the ▁rise ▁of ▁the ▁Abb as ids , ▁the ▁ma w ā l ī ▁gained ▁in ▁prest ige ▁at ▁court , ▁despite ▁their ▁often ▁very ▁hum ble ▁origin . ▁With ▁the ▁introduction ▁of ▁the ▁viz ier ▁as ▁the ▁head ▁of ▁government , ▁a ▁kind ▁of ▁separation ▁of ▁powers ▁emer ged , ▁where ▁the ▁viz ier — us ually ▁drawn ▁from ▁the ▁secret arial ▁class — head ed ▁the ▁administration , ▁while ▁the ▁ha j ib ▁controlled ▁court ly ▁affairs . ▁The ▁hold ers ▁of ▁the ▁two ▁offices ▁often ▁v ied ▁for ▁control ▁of ▁the ▁administration ; ▁thus ▁the ▁ha j ib s ▁al - R abi ' ▁ibn ▁Y un us ▁and