During the civil war between al-Amin and al-Ma'mun, he sided with the latter. In 811, he administered the oath of allegiance (bay'ah) to al-Ma'mun for Mosul, and was named governor of Egypt briefly in 813 and again from 814 to 816. In 817, however, after al-Ma'mun chose the Alid Ali al-Rida as his heir, Muttalib joined the uprising in Baghdad against al-Ma'mun, and even administered the oath to the city's rival Caliph, Ibrahim ibn al-Mahdi.