In Syria, Muhammad ibn Tughj joined the service of the tax supervisor of the local provinces, Abu'l-Abbas al-Bistam. He soon followed his new master to Egypt, and after al-Bistam's death in June 910 he continued serving the latter's son. Eventually, he gained the attention of the local governor, Takin al-Khazari, who sent him to govern the lands beyond the Jordan River, with his seat at Amman. In 918, he rescued a "hajj" caravan, among which was one of the ladies-in-waiting of al-Muqtadir's mother, from Bedouin raiders, thereby improving his standing at the Abbasid court. Two years later, Ibn Tughj gained an influential patron when he briefly served under the powerful Abbasid commander-in-chief Mu'nis al-Muzaffar, when he came to help defend Egypt from a Fatimid invasion. During the campaign, Ibn Tughj commanded the finest troops of the Egyptian army. The two men evidently established a rapport, and remained in contact thereafter.