Ridwan also planned to depose al-Hafiz and the Fatimid dynasty in favour of a Sunni regime headed by himself, but the Caliph raised the army and the people of Cairo against him, forcing him to flee his post in June 1139.