The Battle of Shaidu, also known as the Battle of Pirpai, was fought in March 1827 between the Sikh forces led by Hari Singh Nalwa and the Mujahideen troops, mainly Khattak and Yousafzai tribesmen, led by Syed Ahmad Barelvi. The Sikhs were victorious.
Budh Singh Sandhawalia accompanied by 4,000 horsemen was sent towards Attock to assist in putting down the Yusufzai Rebellion. When Budh Singh arrived at Hazro, he was challenged by Ashraf Khan of Zaida, Fateh Khan of Panjtar and Khadi Khan of Hund along with some Ghazis. The Ghazis fell back. Following this, a battle was fought at Shaidu.
Per the story written in letters by Sayyid Ahmed himself, he claimed that he might have been poisoned by the cook of Yar Muhammad as he felt sick night before the battle. However, Shah Ismail seated him on the elephant and took him to the battlefield. For few days, the Sikh army remained in trenches, under assault of Mujahideen, who were mainly Pashtuns. The action by Sikh army commenced at about ten in the morning. Budh Singh was joined by Gulab Singh, Suchait Singh and Atariwala Sardars. The Sikh army with 30,000 combatants was numerically inferior to Pashtuns but superior in training and discipline. The Gulabnama claims that the Pashtuns numbered more than 100,000. Around 6,000 troops were killed or wounded on the side of the Pashtuns.
It was a disastrous battle for Sayyid and his allies that led to the defeat of combined Mujahideen forces. This was last battle of Pakhtuns against the Sikhs. The Sikhs celebrated the victory with great pomp by illuminating the whole city of Lahore.