In 1511, Safavid forces assisted Babur in retaking Samarqand and Bukhara from the Uzbeks. When the Safavids then withdrew, the Uzbeks drove Babur off. Ismail sent another army to Babur’s assistance, but dissension among the Safavid commanders led to a rout when the allies met the Uzbek forces at Ghujduvan. Though Ismail later drove the Uzbeks out of Khurasan, which they occupied after the battle, Ghujduvan ended expansion of the Safavid Empire.