The Battle of Peshawar was fought on 27 November 1001 between the Ghaznavid army of Mahmud of Ghazni and the Hindu Shahi army of Jayapala, near Peshawar. Jayapala was defeated and captured, and as a result of the humiliation of the defeat, he later immolated himself in a funeral pyre. This is the first of many major battles in the expansion of the Ghaznavid Empire into the Indian subcontinent by Mahmud.
In 962, Alp-Tegin, a Turkic ghulam or slave soldier, who rose to be the commander of the army in Khorasan in the service of the Samanids, seized Ghazna and set himself up as a ruler there. In 997, Mahmud ascended the throne at Ghazni, a successor to Sabuktigin, Mahmud started to vigorously expand his domain, and vowed to invade India every year until the northern lands were his. The Hindu Shahi kingdom extended from Laghman to Kashmir and from Sirhind to Multan. Hindu Shahi ruler Jayapala attacked the Ghaznavids, but was defeated, then again later when his army of a reported size of over 100,000 was beaten too.
In September 1001, Mahmud arrived at Peshawar with a select group of 15,000 cavalry, and a large corps of ghazis and Afghans. Jayapal advanced to confront Mahmud with an army of 12,000 cavalry, 30,000 infantry, and 100 war elephants, positioning himself directly in front of Mahmud's camp. The two armies clashed on 27 November 1001 CE. The battle continued until noon, when the Hindu forces, unable to withstand the Ghaznavids, broke and fled.
An account of the battle between the invading Turkic Ghaznavids and the Shahi kingdom was given by Al-Utbi inTarikh Yamini. According to Al-Utbi, Mahmud pitched his tent outside the city upon reaching Peshawar. Jayapala avoided action for some time waiting for reinforcements, and Mahmud then took the decision to attack with swords, arrows, and spears. Jayapala moved his cavalry and elephants to engage his opponent, but his army was decisively defeated.
Jayapala, along with his fifteen sons and grandsons were captured, and valuable personal adornments were taken off the prisoners, including fifteen necklaces each valued at 80,000 dinars.
The number of Hindu dead ranged from 5,000 to 15,000, and five hundred thousands were said to have been taken captive. Judging from the personal adornments taken off captured Hindus, Jayapala's army was not prepared for battle and thousands were taken captive as well.
After the victory Mahmud proceeded to Hund the capital of the Hindu Shahi dynasty. He launched a powerful assault and captured the town. The demoralized Shahi forces fled toward the mountain passes but were pursued and scattered with heavy slaughter. Ghaznavid cavalry cleared remaining resistance in the plains. Within weeks, the entire lower Kabul valley and surrounding region submitted to Mahmud.
He returned to Ghazni in April 1002 after subjugating adjoining territories. As part of the peace terms Jayapal agreed to pay 250,000 dinars and deliver 50 elephants. He was released to return to his kingdom, but one son and one grandson were held as hostages until the conditions were met.
There are differing views regarding the fate of Jayapala.
Historian Henry Miers Elliot, who worked with the East India Company, writes: <blockquote>Jayapala was bound and paraded, and a large ransom was paid for the release of members of his family. Jayapala felt the defeat to be a great humiliation, and later he built himself a funeral pyre, lit it, and threw himself into the fire.</blockquote>
However, Satish Chandra says: <blockquote>According to some later accounts, Jayapala had entered a funeral pyre following his defeat because he felt he had disgraced himself. The story that he had been taken prisoner by Mahmud and then released seems doubtful.</blockquote>
Mahmud later conquered the upper Indus region, and then in 1009, defeated Jayapala's son Anandapala in a battle at Chach. He then captured Lahore and Multan, giving him control of the Punjab region.