After the death of King Abu Sa'id Mirza in 1469, the great-grandson of Amir Timur Beg Gurkani (Taimur Lung), his much reduced Timurid Empire was divided among four of his sons namely; A civil war between two brothers Umar Shaikh Mirza II (father of Babur), King of Ferghana and Sultan Ahmed Mirza, King of Samarkand and Bukhara was being fought in 1492 when Umar Shaikh died of natural causes leaving his son, the 12-year-old Babur in charge of his Kingdom.
Sultan Ali Mirza left Bukhara on a campaign against his brother in Samarkand, but the inhabitants of the city put up a fierce resistance.
These events and the confusion and anarchy with which they were attended in the kingdom of Samarkand did not escape the observation of their cousin Babur who resolved to try his fortune two years later.
But as the autumn was already drawing to a close and the winter was fast approaching, and as the country round Samarkand was exhausted by the presence of so many armies and altogether unable to furnish the requisite provisions for the troops all the invading princes, they were forced to withdraw to their own territories.
The city remained in Timurid hands, but would be definitively lost to the invading Uzbeks under command of Muhammad Shaybani in 1501.