[5] During the civil war of 865–866 between the rival caliphs al-Musta'in and al-Mu'tazz he played a prominent role as one of Muhammad's lieutenants in defending Baghdad against a yearlong siege, having initially commanded the defense of the Shammasiyyah Gate on the east side of the city and later helping to repulse an assault by the besieging Samarran army.
In the summer of that year he was charged with recapturing the town of Anbar from the forces of al-Mu'tazz, but despite having a great number of troops he was twice repulsed with heavy losses, causing Muhammad to publicly chastise both him and his men as a result.
[6] After the end of the war al-Husayn appears to have remained in the service of Muhammad until the latter's death in 867, and he participated in the suppression of a troop riot in Baghdad in 866.
[7] Under Muhammad's successor Ubaydallah ibn Abdallah ibn Tahir he was placed in charge of the double bridge of Baghdad and the districts of Qatrabbul, Maskin and Anbar and additionally held command over the non-Arab and Shakiriyyah troops.
[9] He later held the office of chief of security (shurta) of Baghdad on behalf of Muhammad ibn Tahir in 885, during which time he protected a local monastery from being destroyed by a mob.