In 1818, Ranjit Singh made an aggressive push against the Durranis, defeating the Kabul Vizier and Muhammad Azem Khan Barakzai he pushed as far as Peshawar, which under the Durrani Governor Yar Muhammad Khan accepted his rule and paid tribute as a vassal. With this victory Ranjit Singh withdrew from the Peshawar Valley leaving a small garrison in a newly constructed fort at Khairabad, modern day Nowshera. This was in turn followed by Ranjit Singh's capture of Kashmir in 1819 from Azem Khan's other brother Jabbar Khan. Angered by his defeats, Azem Khan recaptured Peshawar in 1822, he made a call for jihad against the Sikhs and hurried to Nowshera where Muhammad Zaman Khan successfully destroyed the bridge at Attock, effectively trapping the Sikh garrisons west of the Indus. However Ranjit Singh had already reinforced his forces in Nowshera including general Hari Singh Nalwa with backing from Pashtun tribes loyal to Shah Shuja. These forces successfully repulsed attacks by Pashtun ghazis and Durrani troops at Jahangira and withdrew to Nowshera hoping to link up with Ranjit Singh.
Battle
Ranjit Singh by this point had brought up his army to the east of Hund, on the opposite bank, a lashkar of thousands of fighters led by Syed Ahmad Shah of Buner had started forming. Despite the odds, Ranjit Singh's forces crossed the Indus under fierce attacks. The lashkar then withdrew to Pir Sabak hill where they concentrated their forces and hoped to gain support from the Durrani troops and their artillery under Azim Khan. Azem Khan for unknown reasons, did not cross the Kabul River straight away to link up with the tribesmen. Ranjit Singh realising the situation concentrated his artillery and infantry on the lashkar and left a small detachment under General Ventura to forestall any crossing by Azim Khan. What proceeded was ferocious hand-to-hand fights between the Tribal lashkar and the Sikh Khalsa Army. Finally after the fourth attack, led personally by Ranjit Singh and his personal bodyguard themselves the hill was carried. By the late evening the lashkar realised that Azim Khan had withdrawn from the battle and abandoned his allies. This coupled with the withering attacks by the Sikh artillery, broke the lashkar's resolve and thought willing to rally again under their Pir Ahmad Shah they dispersed in disarray, the Sikh victory was complete.
Aftermath
Swiftly securing Nowshera, Ranjit Singh's forces captured Peshawar and reached Jamrud itself. Destroying the remains of Durrani power, they reduced Peshawar to ruins and secured the Khyber Pass so no Durrani reinforcements could threaten them again. The tribesman of Khattaks and Yousafzais suffered enormous casualties due to the Sikh artillery and the seeming betrayal by the Muhammadzai Sardars led to a lack of trust in the Durranis' word from then onwards. Azim Khan's retreat has never been explained fully, some say he believed his brother had returned to recapture Peshawar at the behest of the Sikhs, others attribute his retreat to cowardice or fear of being cut off by the ferocious Sikh attack. He did not recover from the shock of the defeat and died shortly after the battle. Ranjit Singh's victory was to mark the highpoint of his campaigns, his empire now stretched from the Khyber Pass to the west, to the north Kashmir and to the southMultan. With this victory, he planned to eventually push further west and take the Afghan capital of Kabul itself, but failed.