Question: What dynasty was founded by one of the prominent rulers of Afghanistan during the First Anglo-Afghan War, who had a  dispute with former emir Shah Shujah hom they installed upon conquering Kabul in August 1839?
Sentence (from "1842 retreat from Kabul"): However a deteriorating situation made their position more and more precarious, until an uprising in Kabul forced the then commander, Major General Sir William Elphinstone, to withdraw the garrison.
Relevant evidence: No