Yelü Dashi
The same year that Sanjar pardoned Atsïz, the Kara Khitai under Yelü Dashi defeated the Seljuks at Qatwan, near Samarkand. Atsïz took advantage of the defeat to invade Khorasan, occupying Merv and Nishapur. Yelü Dashi, however, sent a force to plunder Khwarazm, forcing Atsïz to pay an annual tribute.