Hafs ibn al-Walid ibn Yusuf al-Hadrami

Hafs was a member of a well-connected family from the original Arab settler community in Egypt, the "jund",[1] chiefly resident at the capital of Fustat, which had traditionally dominated the province's administration.

[3] The Syrians were forcibly expelled from Fustat, and Hafs set about recruiting a force of 30,000 men, named Hafsiya after him, from among the native non-Arab converts ("maqamisa" and "mawali").

When the pro-Qays Marwan II rose to the throne in 744, Hafs resigned and the new Caliph ordered his replacement with Hasan ibn Atahiya and the disbandment of the Hafsiya.

[1][4] The Hafsiya, however, refused to accept the order to disband and mutinied, besieging the new governor in his residence until he and his sahib al-shurta both were forced to leave Egypt.

In the next year, 745, Marwan dispatched a new governor, Hawthara ibn Suhayl al-Bahili, at the head of a large Syrian army.