This allowed Il-Arslan to effectively break off Seljuk suzerainty, although he remained on friendly terms with Sanjar's successor, Mas'ud.
He responded by invading the Karakhnid dominions, taking Bukhara and besieging Samarkand, where Chaghrï Khan had taken refuge.
The latter appealed to both the Turks of the Syr Darya and the Qara Khitai, and the gurkhan sent an army, but its commander hesitated to enter into conflict with the Khwarazmis.
In the end a peace was mediated where Chaghrï Khan was forced to take back the Qarluk leaders and restore them to their former positions.
Following his death the state briefly became embroiled in turmoil, as the succession was disputed between his sons Tekish and Sultan Shah.