Mu'ayyid al-Mulk was in Khurasan at the end of 1094, but fled to the capital Isfahan to join Berkyaruq, who appointed him as his vizier. He convinced or bribed the leading figures of Iraq and Khurasan who had joined Tutush I to return to the allegiance of Berkyaruq. He also played a key-role in the defeat of Tutush in 1095, at Dashilu, near Ray.