Abu Nasr was the son of al-Sari ibn al-Hakam, the governor of Egypt in 816 and 817–820, and he inherited that position upon the latter's death in November 820. During his governorship Egypt remained divided among the various factions that had seized control in the midst of the power vacuum created during the civil war between al-Amin and al-Ma'mun, and Abu Nasr's actual authority was mainly limited to the southern portion of the province, while much of Lower Egypt was in the hands of Ali ibn Abd al-Aziz al-Jarawi, the son of al-Sari's former rival Abd al-Aziz ibn al-Wazir al-Jarawi.