Ubayd Allah fought for Marwan and his tribal allies against the Qaysi tribes led by al-Dahhak ibn Qays al-Fihri, the governor of Damascus, at the Battle of Marj Rahit in August 684. The Qays were routed and al-Dahhak killed. Ubayd Allah was put in command of Marwan's army which, during Marj Rahit, consisted 6,000 men from a handful of loyalist tribes. According to Kennedy, Ubayd Allah "clearly intended to rebuild the Syrian army which had served Mu'awiya and Yazid I so well". In the aftermath of Marj Rahit, Ubayd Allah oversaw campaigns against rebel Qaysi tribes for Marwan and his son and successor Abd al-Malik (r. 685–705) in the Jazira. However, Marwan's forces were too little to assert Umayyad rule throughout the caliphate. Thus, Ubayd Allah expanded recruitment to include various Qaysi tribes. He placed Husayn ibn Numayr al-Sakuni of Kindah as his second-in-command, and Shurahbil ibn Dhi'l-Kila' of Himyar, Adham ibn Muhriz of Bahila, al-Rabi'a ibn Mukhariq of Banu Ghani and Jabala ibn Abd Allah of Khath'am as deputy commanders. Other than Husayn ibn Numayr, all of the commanders were either Qaysi or had earlier supported al-Dahhak against Marwan.