 The Kara-Khitans, who were also invited by the Khwarazmians (then also a vassal of the Seljuks) to conquer the lands of the Seljuks as well as in response to an appeal to intervene by the Karluks who were involved in a conflict with the Karakhanids, then advanced to Samarkand.In 1141, the Seljuks under Ahmad Sanjar also arrived in Samarkand with his army, but was defeated by the Kara-Khitans in the Battle of Qatwan, after which the Kara-Khitans became dominant in Transoxania.The western Khitan state became known under its Turkic name, the Kara-Khitan Khanate and their ruler bore the Turkic title Gurkhan "Khan’s son-in law".