As one of Harun's younger sons, Abu Ishaq was initially of little consequence, and did not figure in the line of succession. Soon after Harun died in 809, a vicious civil war broke out between his elder half-brothers al-Amin () and al-Ma'mun (). Al-Amin enjoyed the backing of the traditional Abbasid elites in Baghdad (the "abnāʾ al-dawla"), while al-Ma'mun was supported by other sections of the "abnāʾ". Al-Ma'mun emerged victorious in 813 with the surrender of Baghdad after a long siege and the death of al-Amin. Choosing to remain in his stronghold in Khurasan, on the northeastern periphery of the Islamic world, al-Ma'mun allowed his main lieutenants to rule in his stead in Iraq. This resulted in a wave of antipathy towards al-Ma'mun and his "Persian" lieutenants, both among the Abbasid elites in Baghdad and generally in the western regions of the Caliphate, culminating in the nomination of Harun al-Rashid's younger brother Ibrahim as anti-caliph at Baghdad in 817. This event made al-Ma'mun realise his inability to rule from afar; bowing to popular reaction, he dismissed or executed his closest lieutenants, and returned in person to Baghdad in 819 to begin the difficult task of rebuilding the state.