As soon as his troops were rested and winter ended he marched towards the Fort of Qila Hissar Shadman, taking it and expelling two important Uzbek leaders: Hamza and Mahdi Sultan.
While Babur lay at Kunduz an embassy arrived from Shah Ismail bringing the Emperor's sister Khanzada Begum with rich presents and tenders of amity.
Shah Ismail reunited Babur with his sister, who had been imprisoned by and forced to marry the recently deceased Muhammad Shaybani.
Over the following few years, Babur and Shah Ismail I would form a partnership in an attempt to take over parts of Mawarannahr (Transoxiana) in Central Asia.
As the Uzbeks had ascertained that Shah Ismail had conceded the possession of Mawarannahr to Babur, they no longer apprehended an attack from him in person and their whole force being now disposable, they took their measures accordingly.
He discovered also that the Uzbek army was far more numerous than he had supposed and commanded by chiefs of the first distinction and that to meet them in the field would be extremely dangerous.
The Uzbeks on their part when informed of the inferiority of Babur's force passed the river lower down than Pul Sangin the stone bridge by swimming.
Intelligence of this movement having reached him about afternoon prayers he instantly put his army in motion and marched for Ab Darrah where the passes in the hills are extremely narrow and steep.
All that night and the succeeding day till noon he continued marching with the utmost celerity when he at length arrived at a position which the most experienced leaders considered to be very strong and there took his ground.
Haider's men under Jan Muhammad Atgah, as soon as they arrived, attacked them in front and the fugitives rallying returned to the fight and succeeded in driving back the Uzbeks.
He received the offering with joy as a favorable omen and on the spot ordered the first prize of valor to be inscribed in Mirza Haider's name.
The portion of their army that was opposed to Khan Mirza having observed Hamza Sultan and the main body in retreat were also eager to retire.
In this opinion, Babur concurred and he marched past it and encamped when his scouts reported that Ubaydullah Sultan had quitted Karshi and was in full route for Bukhara.
The roads and streets were thronged with the population; the houses, bazaars, and public entries were hung with drapery of brocade and of the richest stuffs paintings and wrought work.
He was proclaimed King at Samarkand in the beginning of October, 1511 amid the blessings and prayers of the inhabitants who looked forward to years of happiness under the mild sway of an enlightened and beneficent sovereign.