By the grace of the Almighty God, this difficult task was made easy to me and that mighty army, in the space of a half a day was laid in dust.
In 1501, Babur laid siege to Samarkand once more, but was soon defeated by his most formidable rival, Muhammad Shaybani, Khan of the Uzbeks. Samarkand, his lifelong obsession, was lost again. He tried to reclaim Fergana but lost it too and escaping with a small band of followers, he wandered to the mountains of central Asia and took refuge with hill tribes. Thus, during the ten years since becoming the ruler of Fergana, Babur suffered many short-lived victories and was without shelter and in exile, aided by friends and peasants. He finally stayed in Tashkent, which was ruled by his maternal uncle. Babur wrote, "During my stay in Tashkent, I endured much poverty and humiliation. No country, or hope of one!" For three years Babur concentrated on building up a strong army, recruiting widely amongst the Tajiks of Badakhshan in particular. By 1502, he had resigned all hopes of recovering Fergana; he was left with nothing and was forced to try his luck someplace else.
Kabul was ruled by Ulugh Begh Mirza of the Arghun Dynasty, who died leaving only an infant as heir. The city was then claimed by Mukin Begh, who was considered to be a usurper and was opposed by the local populace. In 1504, Babur was able to cross the snowy Hindu Kush mountains and capture Kabul from the remaining Arghunids, who were forced to retreat to Kandahar. With this move, he gained a new kingdom, re-established his fortunes and would remain its ruler until 1526. In 1505, because of the low revenue generated by his new mountain kingdom, Babur began his first expedition to India; in his memoirs, he wrote, "My Desire for Hindustan had been constant. It was in the month of Shaban, the Sun being in Aquarius, that we rode out of Kabul for Hindustan". It was a brief raid across the Khyber Pass.
In the same year, Babur united with Sultan Husayn Mirza Bayqarah of Herat, a fellow Timurid and distant relative, against their Common enemy, the Uzbek Shaybani. However, this venture did not take place because Husayn Mirza died in 1506 and his two sons were reluctant to go to war. Babur instead stayed at Herat after being invited by the two Mirza brothers. It was then the cultural capital of the eastern Muslim world. Though he was disgusted by the vices and luxuries of the city, he marvelled at the intellectual abundance there, which he stated was "filled with learned and matched men". He became acquainted with the work of the Chagatai poet Mir Ali Shir Nava'i, who encouraged the use of Chagatai as a literary language. Nava'i's proficiency with the language, which he is credited with founding, may have influenced Babur in his decision to use it for his memoirs. He spent two months there before being forced to leave because of diminishing resources; it later was overrun by Shaybani and the Mirzas fled.
Babur's early relations with the Ottomans were poor because the Ottoman Sultan Selim I provided his rival Ubaydullah Khan with powerful matchlocks and cannons. In 1507, when ordered to accept Selim I as his rightful suzerain, Babur refused and gathered Qizilbash servicemen in order to counter the forces of Ubaydullah Khan during the Battle of Ghazdewan. In 1513, Selim I reconciled with Babur (fearing that he would join the Safavids), dispatched Ustad Ali Quli the artilleryman and Mustafa Rumi the matchlock marksman, and many other Ottoman Turks, in order to assist Babur in his conquests; this particular assistance proved to be the basis of Future Mughal-Ottoman relations. From them, he also adopted the tactic of using matchlocks and cannons in field (rather than only in sieges), which would give him an important advantage in India.
Babur and the remaining Timurids used this opportunity to reconquer their ancestral territories. Over the following few years, Babur and Shah Ismail formed a partnership in an attempt to take over parts of Central Asia. In return for Ismail's assistance, Babur permitted the Safavids to act as a suzerain over him and his followers. Thus, in 1513, after leaving his brother Nasir Mirza to rule Kabul, he managed to take Samarkand for the third time; he also took Bokhara but lost both again to the Uzbeks. Shah Ismail reunited Babur with his sister Khānzāda, who had been imprisoned by and forced to marry the recently deceased Shaybani. Babur returned to Kabul after three years in 1514. The following 11 years of his rule mainly involved dealing with relatively insignificant rebellions from Afghan tribes, his nobles and relatives, in addition to conducting raids across the eastern mountains. Babur began to modernise and train his army despite it being, for him, relatively peaceful times.
Babur still wanted to escape from the Uzbeks, and he chose India as a refuge instead of Badakhshan, which was to the north of Kabul. He wrote, "In the presence of such power and potency, we had to think of some place for ourselves and, at this crisis and in the crack of time there was, put a wider space between us and the strong foeman." After his third loss of Samarkand, Babur gave full attention to the conquest of North India, launching a campaign; he reached the Chenab River, now in Pakistan, in 1519. Until 1524, his aim was to only expand his rule to Punjab, mainly to fulfill the legacy of his ancestor Timur, since it used to be part of his empire. At the time parts of north India were under the rule of Ibrahim Lodi of the Lodi dynasty, but the empire was crumbling and there were many defectors. He received invitations from Daulat Khan Lodi, Governor of Punjab and Ala-ud-Din, uncle of Ibrahim. He sent an ambassador to Ibrahim, claiming himself the rightful heir to the throne, but the ambassador was detained at Lahore and released months later.
Babur started for Lahore, Punjab, in 1524 but found that Daulat Khan Lodi had been driven out by forces sent by Ibrahim Lodi. When Babur arrived at Lahore, the Lodi army marched out and his army was routed. In response, Babur burned Lahore for two days, then marched to Dipalpur, placing Alam Khan, another rebel uncle of Lodi, as governor. Alam Khan was quickly overthrown and fled to Kabul. In response, Babur supplied Alam Khan with troops who later joined up with Daulat Khan Lodi, and together with about 30,000 troops, they besieged Ibrahim Lodi at Delhi. He easily defeated and drove off Alam's army and Babur realised Lodi would not allow him to occupy the Punjab.
In November 1525 Babur got news at Peshawar that Daulat Khan Lodi had switched sides, and he drove out Ala-ud-Din. Babur then marched onto Lahore to confront Daulat Khan Lodi, only to see Daulat's army melt away at their approach. Daulat surrendered and was pardoned. Thus within three weeks of crossing the Indus River Babur had become the master of Punjab.
Babur marched on to Delhi via Sirhind. He reached Panipat on 20 April 1526 and there met Ibrahim Lodi's numerically superior army of about 100,000 Soldiers and 100 elephants. In the battle that began on the following day, Babur used the tactic of Tulugma, encircling Ibrahim Lodi's army and forcing it to face artillery fire directly, as well as frightening its war elephants. Ibrahim Lodi died during the battle, thus ending the Lodi dynasty.
The Battle of Khanwa was fought between Babur and the Rajput ruler Rana Sanga on 17 March 1527. Rana Sanga wanted to overthrow Babur, whom he considered to be a foreigner ruling in India, and also to extend the Rajput territories by annexing Delhi and Agra. He was supported by Afghan chiefs who felt Babur had been deceptive by refusing to fulfill promises made to them. Upon receiving news of Rana Sangha's advance towards Agra, Babur took a defensive position at Khanwa (currently in the Indian state of Rajasthan), from where he hoped to launch a counterattack later. According to K.V. Krishna Rao, Babur won the battle because of his "superior generalship" and modern tactics: the battle was one of the first in India that featured cannons. Rao also notes that Rana Sanga faced "treachery" when the Hindu chief Silhadi joined Babur's army with a garrison of 6,000 Soldiers.
Babur died at the age of 47 on 5 January [O.S. 26 December 1530] 1531 and was succeeded by his eldest son, Humayun.
Babri Masjid ("Babur's Mosque") in Ayodhya, India was constructed on the orders of Mir Baqi, one of Babur's generals who led forces sent to the region during his reign. In 2003, by the order of an Indian Court, the Archaeological Survey of India (ASI) was asked to conduct a more indepth study and an excavation to ascertain the type of structure that was beneath the mosque. The excavation was conducted from 12 March 2003 to 7 August 2003, resulting in 1360 discoveries. The ASI submitted its report to the Allahabad high court.
Babur is considered a national hero in Uzbekistan. On 14 February 2008, stamps in his name were issued in the country to commemorate his 525th birth anniversary. Many of Babur's poems have become popular Uzbek folk songs, especially by Sherali Jo'rayev. Some sources claim that Babur is a national hero in Kyrgyzstan too. In October 2005, Pakistan developed the Babur Cruise Missile, named in his honour.
Babur's first wife, Aisha Sultan Begum, was his paternal cousin, the daughter of Sultan Ahmad Mirza, his father's brother. She was an infant when betrothed to Babur, who was himself five years old. They married eleven years later, c. 1498–99. The couple had one daughter, Fakhr-un-Nissa, who died within a year in 1500. Three years later, after Babur's first defeat at Fergana, Aisha left him and returned to her father's household. In 1504, Babur married Zaynab Sultan Begum, who died childless within two years. In the period 1506–08, Babur married four women, Maham Begum (in 1506), Masuma Sultan Begum, Gulrukh Begum and Dildar Begum. Babur had four children by Maham Begum, of whom only one survived infancy. This was his eldest son and heir, Humayun. Masuma Sultan Begum died during childbirth; the year of her death is disputed (either 1508 or 1519). Gulrukh bore Babur two sons, Kamran and Askari, and Dildar Begum was the mother of Babur's youngest son, Hindal. Babur later married Mubaraka Yusufzai, a Pashtun woman of the Yusufzai tribe. Gulnar Aghacha and Nargul Aghacha were two Circassian slaves given to Babur as gifts by Tahmasp Shah Safavi, the Shah of Persia. They became "recognized ladies of the royal household."
The summary of the ASI report indicated the presence of a 10th-century temple under the mosque. According to the ASI team, the human activity at the site dates back to the 13th century BCE. The next few layers date back to the Shunga period (second-first century BCE) and the Kushan period. During the early medieval period (11–12th century CE), a huge but short-lived structure of nearly 50 metres north-south orientation was constructed. On the remains of this structure, another massive structure was constructed: this structure had at least three structural phases and three successive floors attached with it. The report concluded that it was over the top of this construction that the disputed structure was constructed during the early 16th century.
Babur became the only reigning ruler of the Timurid dynasty after the loss of Herat, and many princes sought refuge from him at Kabul because of Shaybani's invasion in the west. He thus assumed the title of Padshah (emperor) among the Timurids—though this tile was insignificant since most of his ancestral lands were taken, Kabul itself was in danger and Shaybani continued to be a threat. Babur prevailed during a potential rebellion in Kabul, but two years later a revolt among some of his leading generals drove him out of Kabul. Escaping with very few companions, Babur soon returned to the city, capturing Kabul again and regaining the allegiance of the rebels. Meanwhile, Shaybani was defeated and killed by Ismail I, Shah of Shia Safavid Persia, in 1510.