 Al-Rashid virtually dismembered the empire by apportioning it between his two sons al-Amin and al-Ma'mun (with his third son, al-Qasim, being belatedly added after them).Very soon it became clear that by dividing the empire, Rashid had actually helped to set the opposing parties against one another, and had provided them with sufficient resources to become independent of each other.After the death of Harun al-Rashid, civil war broke out in the empire between his two sons, al-Amin and al-Ma'mun, which spiralled into a prolonged period of turmoil and warfare throughout the Caliphate, ending only with Ma'mun's final triumph in 827.