From the conquest of Iran Tamerlane distracted events on the eastern borders of his empire - the khan of the Golden Horde Tokhtamysh attacked and besieged Maurya Bukhara. Learning of this, Timur in 1388 hurried back to Samarkand. For several years Tokhtamysh became his main opponent. Having expelled the enemy, Timur went to Khorezm, whose ruler supported Tokhtamysh took Urgench and executed Khorezmshah. All the inhabitants of the capital of Khorezm Timur ordered to move to Samarkand, and the city destroy, raze to the ground and sow the barley in its place. In 1389, Timur made a grand march in Moghulistan against the rules there is a descendant of Genghis Khan Hyzr-Khoja. Broken troops last he pursued to the banks of the Irtysh. In May 1391 Timur crossed the Yaik (Ural) and defeated on the river Kundurche Tokhtamysh army.