Following the outbreak of civil war in 865 between the rival caliphs al-Musta'in (in Baghdad) and al-Mu'tazz (in Samarra), Muzahim initially sided with the former and made his way from Raqqa to Baghdad, where he was received with honor. Over the next several months he participated in the defense of Baghdad and was at one point wounded when he was struck by an arrow.[4]