Capture of Samarqand

Babur wanted to recapture land Samarqand, so he attacked Shaybani Khan in 1501-6 but was defeated. In 1507 he again attempted t to capture Samarkand but failed. He got the news of defeat and death of Shaybani in the Hands-of  Ismail I of Iran. He formed an alliance with Ismail and successfully captured Tashkent, Qunduz, Hisar, Samarqand, Bukhara, Farghana, Kabul and Ghazni... His victory was short lived as Ubaid-Ulahb Khan defeated him and recovered almost all land. 

He gave up the idea of capturing Samarqand and then invaded India establishing the Mughal Empire.
Battle
Babur, the ruler of Farghana, dreamed of ruling from his ancestor Timur's throne in Samarqand. In 1494, his uncle died, and Babur saw a chance to take Samarqand. He succeeded in 1497 but lost the city after only 100 days when he fell ill, and a rebellion broke out in Farghana. Babur tried to regain control but failed and was left with almost nothing.

For years, he wandered with only a few hundred followers. He briefly regained Farghana in 1498 but lost it again in 1500. In 1501, Babur took Samarqand from the Uzbek ruler Shaibani Khan, but Shaibani Khan defeated him in 1502, forcing Babur to leave again.

Babur had to give his sister in marriage to Shaibani Khan to buy his freedom. For the next three years, he lived as a fugitive, often begging for food and traveling in tough conditions. Despite all his hardships, Babur stayed hopeful and never lost his cheerful spirit.

Babur settled in Afghanistan but still wanted to reclaim Samarquand, his ancestral homeland. In 1507, he visited his cousins in Herat, hoping for help to defeat his enemy, Shaibani Khan, but returned disappointed.

In 1510, Babur learned that Shaibani Khan had been killed in battle by Shah Ismail of Iran. Babur then took Samarquand, Bukhara, and Khurasan with Shah Ismail’s help. His kingdom grew to include Tashkent, Qunduz, Hisar, Samarquand, Bukhara, Farghana, Kabul, and Ghazni. But after Shah Ismail left, the Uzbegs returned and defeated Babur in 1512. Babur was forced to retreat to Kabul.

One reason for his defeat was his adoption of Shia Islam, which angered the Sunni people of Trans-Oxiana. Babur gave up on ruling Samarquand and kept only Badakhshan, which he gave to his cousin. As king of Kabul, he had to deal with constant rebellions and collect taxes from the Afghan people.
 References 

Category:India