In 664 or 665, he was dispatched by Caliph
Mu'awiya I at the head of 4,000 soldiers from Medina to reinforce the Arab garrison in
Alexandria after the garrison commander of the city complained his troops were numerically insufficient to control its oft-rebellious
Greek Christian inhabitants. In 680, he issued a warning to
Husayn ibn Ali, the surviving grandson of the Islamic prophet
Muhammad and son of Caliph
Ali (), not to leave Mecca for
Kufa where sympathizers of his father called for him to claim the
caliphate from the ruling
Umayyad dynasty. He advised him to take up safe haven in the
Ka'aba of Mecca where he could rally supporters from the Quraysh against Caliph
Yazid (). After a short stay in Mecca, Husayn ultimately headed for Kufa and once again encountered Ibn Muti at a watering place along the desert route, where Ibn Muti pleaded with him that he not confront the Umayyads. Husayn ignored his advice and was slain by Umayyad forces at the
Battle of Karbala on the outskirts of Kufa. Ibn Muti had attempted to depart Medina as well, but was persuaded by his distant relative
Abd Allah ibn Umar to remain in the city and not rebel against the caliph. When Yazid sent his envoy
Nu'man ibn Bashir al-Ansari to warn the inhabitants of Medina in 682 not to rebel against the caliph's rule, Ibn Muti derided him. The people of Medina rose in revolt and Yazid dispatched his Syrian troops led by
Muslim ibn Uqba to subdue the city. The Medinese were organized along factional lines and Ibn Muti was made commander of the Quraysh contingent. After the Syrians bested the Medinese, Ibn Muti and many of his Qurayshite fighters fled for Mecca where they were given safe haven by the Qurayshite leader
Abd Allah ibn al-Zubayr. He later became one of the main commanders of Mecca's defence during the abortive
Umayyad siege of the city in 683. ==Governorship of Kufa==