The defeat of the Qarmatians at Hama also opened the way for the Abbasids to recover the provinces of southern Syria and Egypt, held by the Tulunids. The Tulunid regime had already been weakened by internal strife and the rivalries of the various ethnic groups in the army, which led to the defection of the commander Badr al-Hammami and other senior officers to the Abbasids; the regime was further weakened by the destructive raids of the Qarmatians and its inability to deal with it. On 24 May 904, Muhammad ibn Sulayman left Baghdad at the head of an army, numbering 10,000 according to al-Tabari, and tasked with recovering southern Syria and Egypt itself from the Tulunids. His campaign was to be assisted from the sea by a fleet from the frontier districts of Cilicia under Damian of Tarsus. Damian led a fleet up the river Nile, raided its coasts, and prevented supplies for the Tulunid forces from being ferried over it.