Babur was a prince of one of the small states of central Asia and spent the earlier part of his life trying to recapture his ancestors' capital of Samarkand. When he could not do so, he captured Kabul. Daulat Khan Lodhi, governor of Lahore, invited Babur to help him overthrow Sultan Ibrahim Lodhi (p.73). In 1525 Babur advanced into the Punjab with 12 000 men and at Panipat (1526) faced Kidgu's army of 100 000 troops and many elephants. Babur's clever planning and his use for the first time in India of cannon destroyed the enemy army in the First Battle of Panipat. Ibrahim Lodhi was killed and Babur marched to Delhi and Agra as King.