 By 1801, Ranjit Singh captured Lahore and threw off the Afghan yoke from North West India.In Afghanistan Zaman Shah Durrani was defeated by powerful Barakzai chief Fateh Khan who appointed Mahmud Shah Durrani as the new ruler of Afghanistan and appointed himself as Wazir of Afghanistan.Sikhs however were now superior to the Afghans and started to annex Afghan provinces.