Sultan Muhammed tried to reinvigorate the Seljuk authority in Iraq. On the contrary to these efforts, the caliph was cleansing off the Turkish elements in Iraq.
Suleymanshah was declared as the sultan when Sencer, the ruler of the Great Seljuk State was taken as prisoner by Oguz people, but he could not get any success against Oguz people and he abandoned Khorasan (1154). After a while, he came to Baghdad with a small force (1155). The Abbasi caliph, Muktefi wanted to get rid of the Seljuk authority and he had attained some successes towards this purpose. The Caliph Muktefi considered Suleymanshah as a beneficial means in order to get the use of him against Muhammed. Then, he delivered prayers in the name of Suleymanshah as the sultan. Furthermore, he assigned Melikshah as the crown prince and took him to his side and took Suleymanshah as prisoner. Sultan Muhammed II was angry to the caliph since he had helped his rival. Moreover, he had considered himself as powerful enough to insult him. He besieged Baghdad with all of his forces (1157). The blockade lasted for a long time, and there were severe wars both on the lands and on the banks of Tigris River. Meanwhile, upon the encouragement of the caliph, the Prince Melikshah, Arslan-shah and the Tutor Ildeniz set in motion with a counterattack in the region of Cibal and they captured Hamedan (1157). When he heard of this news, Sultan Muhammed foreclosed the blockade of Baghdad and advanced towards Hamedan. However, Ildeniz had returned to Azerbaijan and Melikshah who had been deprived of military forces had left Hamedan. Sultan Muhammed annihilated their supporters in Rey and Isfahan, but he died in Hamedan in the year of 1159.
