In 1232 al-Kamil of Egypt ordered Abu Sa'd, then Emir of Yanbu, to assist in recapturing Mecca from Rajih ibn Qatadah, who was supported by al-Mansur of Yemen.
The Sultan bought the fortress of Yanbu from Abu Sa'd and ordered for it to be destroyed, so as to not be utilized by the Egyptians, and assigned him to Wadi Marr to support the Yemeni army at Mecca.
In 1250 Abu Sa'd received support from leaders of the Zubayd tribe to wrest Mecca from the oppressive rule of Ibn al-Musayyib, the Yemeni emir.
Abu Sa'd gathered the notables of Mecca in the Grand Mosque, where he expressed to them his continued loyalty to the Sultan, and explained that Ibn al-Musayyib had been planning to take the wealth he had stolen and flee to Iraq.
According to various reports it was either on 5 Shawwal (c. 28 November 1253), in the beginning of Ramadan (late October 1253), or on 3 Sha'ban (c. 28 September 1253).