Harun had arranged the division of the Abbasid empire between his sons, a step that accelerates the caliphate’s administrative decline and political disintegration.
In the last days of Harun's life his health is declining and sees in a dream Musa ibn Jafar sitting in a chamber praying and crying, which makes Harun remember how hard he had struggled to establish his own caliphate.
He knows the personalities of both his sons and decides that for the good of the Abbasid dynasty, al-Maʾmūn should be caliph after his death; this he confides to a group of his courtiers before his death on March 24, 809.
One of the courtiers, Fadl ibn Rabi', does not abide by Harun's last wishes and persuades many in the realm that Harun's wishes had not changed.
Later, the other three courtiers of Harun, who had sworn loyalty to Harun by supporting al-Maʾmūn, namely 'Isa Jarudi, Abu Yunus, and Ibn Abi 'Umran find loopholes in Fadl's arguments, and Fadl admits Harun had appointed al-Maʾmūn after him, but, he argues, since Harun was not in his right mind, his decision should not be acted upon.
Al-Maʾmūn is reportedly the older of the two brothers, but his mother is a Persian woman while al-Amin's mother is a member of the reigning Abbasid family.
Fadl ibn al-Rabi causes the army to pledge its allegiance (bay'ah) to Harun's heir al-Amin, who has remained behind in Baghdad.
Amin, who had need of Fadl's experience, sends letters to him urging him to return to the capital, and to bring with him the treasury, which Harun had taken along, as well as the entire expeditionary army assembled to crush the rebellion.
Al-Ma'mun, who is tasked with the governance of Khurasan, regards the withdrawal of the entire army as a betrayal, and vainly tries to dissuade Fadl from this move.