himself proclaimed king in 1803, and recaptured Peshawar while Mahmud Shah was imprisoned at Bala Hissar fort until his eventual escape. In 1809, the British sent an emissary to the court of Shah Shujah in Peshawar, marking the first diplomatic meeting between the British and Afghans. Mahmud Shah allied himself with the Barakzai Pashtuns, and amassed an army in 1809, and captured Peshawar from his half-brother, Shah Shujah, establishing Mahmud Shah's second reign, which lasted under 1818. Sikh Empire Ranjit Singh invaded Peshawar in 1818 and captured it from the Durrani Empire. The Sikh Empire based in Lahore did not immediately secure direct control of the Peshawar region, but rather paid nominal tribute to Jehandad Khan of Khattak, who was nominated by Ranjit Singh to be ruler of the region. After Ranjit Singh's departure from the region, Khattak's rule was undermined and power seized by Yar Muhammad Khan. In 1823, Ranjit Singh returned to capture Peshawar, and was met by the armies of Azim Khan at Nowshera. Following the Sikh victory at the Battle of Nowshera, Ranjit Singh re-captured Peshawar. Rather than re-appointing Jehandad Khan of Khattak, Ranjit Singh selected Yar Muhammad Khan to once again rule the region. The Sikh Empire annexed the Khyber Pakhtunkhwa region following advances from the armies of Hari Singh Nalwa. An 1835 attempt by Dost Muhammad Khan to re-occupy Peshawar failed when his army declined to engage in combat with the Dal Khalsa. Dost Muhammad Khan's son, Mohammad Akbar Khan engaged with Sikh forces the Battle of Jamrud of 1837, and failed to recapture it. During Sikh rule, an Italian named Paolo Avitabile was appointed an administrator of Peshawar, and is remembered for having unleashed a reign of fear there. The city's famous Mahabat Khan, built in 1630 in the Jeweler's Bazaar, was badly damaged and desecrated by the Sikhs, who also rebuilt the Bala Hissar fort during their occupation of Peshawar. British Raj British East India Company defeated the Sikhs during the Second Anglo-Sikh War in 1849, and incorporated small parts of the region into the Province of Punjab. While Peshawar was the site of a small revolt against British during the Mutiny of 1857, local Pashtun tribes throughout the region generally remained neutral or supportive of the British as they detested the Sikhs, in contrast to other parts of British India which rose up in revolt against the British. However, British control