Muhammad's capture of Ray exposed the vulnerability of Berkyaruq's realm. Sa'd al-Dawla Gawhara'in, the shihna (military administrator) of Baghdad, soon joined Muhammad, which implies that the city was also added to his domain. Nevertheless, the five-year war continued to be indecisive, with Baghdad repeatedly changing hands.