Ishaq responded by organizing an expedition to recover the city for the caliph and began marching for the Hijaz, but he suffered an attack by Bedouin en route and was forced to retreat back to Sana'a.
A short time later, he learned that another Alid, Ibrahim ibn Musa al-Kadhim, was advancing toward the Yemen to take control of the country, and decided not to offer any resistance to the rebels.
[2] Following his departure from the Yemen, Ibrahim headed in the direction of Mecca, where Muhammad ibn Ja'far al-Sadiq had been proclaimed as anti-caliph, and eventually reached Mushash, where he encamped.
After failing to defeat the Alid forces, he decided to withdraw and make his way toward Iraq, but along the way he was met by reinforcements led by Warqa' ibn Jamil and convinced to turn back around.
Muhammad ibn Ja'far then decided to evacuate Mecca, allowing Warqa' and Ishaq to enter it in early 816 and reestablish government control.