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?

Context paragraphs:
Mohan Lal (Zutshi): Mohan Lal Zutshi (Kashmiri: मोहन लाल ) (popularly known as Mohan Lal Kashmiri; 1812 – 1877) was a traveller, diplomat, and author.  He played a central role in the First Anglo-Afghan War of 1838–1842.  His biography of Dost Mohammad Khan, emir of Kabul, is a primary source on the War.

Shah Shujah Durrani: Shuja Shah Durrani Khan (also known as "Shāh Shujāʻ", "Shah Shujah", "Shoja Shah", "Shujah al-Mulk") (4 November 1785 – 5 April 1842) was ruler of the Durrani Empire from 1803 to 1809.  He then ruled from 1839 until his death in 1842.  Shuja Shah was of the Sadozai line of the Abdali group of Pashtuns.  He became the fifth Emir of Afghanistan.

Jan-Fishan Khan: Sayyid Muhammed Shah, better known by his title as Jan-Fishan Khan, was a 19th-century Afghan warlord.  He participated in the First Anglo-Afghan War (1839–42) and the Indian Rebellion of 1857, and on both occasions, he supported the British.  For his services to the British, Khan was granted the estate of Sardhana and is the forefather of the Nawabs of Sardhana.  He is an ancestor of Naseeruddin Shah, the Indian actor, and of Zamiruddin Shah, vice-chancellor of Aligarh Muslim University.

1842 retreat from Kabul: The 1842 Kabul Retreat (or Massacre of Elphinstone's army) took place during the First Anglo-Afghan War.  At the beginning of the conflict, British forces had defeated the forces of Afghan Emir Dost Mohammad Barakzai and in 1839 occupied Kabul, restoring the former ruler, Shah Shujah Durrani, as emir.  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.  To this end he negotiated an agreement with Wazir Akbar Khan, one of the sons of Dost Mohammad Barakzai, by which his army was to fall back to the British garrison at Jalalabad, more than 90 mi away.  As the army and its numerous dependents and camp-followers began its march, it came under attack from Afghan tribesmen.  Many of the column died of exposure, frostbite or starvation or were killed during the fighting.

Dost Mohammad Khan (Emir of Afghanistan): Dost Mohammad Khan (Pashto: دوست محمد خان‎ , December 23, 1793June 9, 1863) was the founder of the Barakzai dynasty and one of the prominent rulers of Afghanistan during the First Anglo-Afghan War.  With the decline of the Durrani dynasty, he became Emir of Afghanistan from 1826 to 1839 and then from 1843 to 1863.  An ethnic Pashtun, he was the 11th son of Sardar Payendah Khan (chief of the Barakzai tribe) who was killed in 1799 by Zaman Shah Durrani.  Dost Mohammad's grandfather was Hajji Jamal Khan.

Neville Bowles Chamberlain: Field Marshal Sir Neville Bowles Chamberlain (10 January 1820 – 18 February 1902) was a senior Indian Army officer.  He fought at the Battle of Ghazni in July 1839 during the First Anglo-Afghan War, the Battle of Maharajpur in December 1843 during the Gwalior Campaign and the Battle of Chillianwala in January 1849 and the Battle of Gujrat in February 1849 during the Second Anglo-Sikh War.  During the Indian Rebellion he served as Adjutant-General of the Indian Army and was severely wounded at the Siege of Delhi in July 1857.  He went on to be Commander-in-chief of the Madras Army in February 1876 and was sent on a mission to the Emir of Afghanistan, Sher Ali Khan, whose refusal to allow him to enter the country precipitated the Second Anglo-Afghan War in November 1878.

First Anglo-Afghan War: The First Anglo-Afghan War (also known as Disaster in Afghanistan) was fought between British imperial India and the Emirate of Afghanistan from 1839 to 1842.  The war is notorious for the loss of 4,500 British and Indian soldiers, plus 12,000 of their camp followers, to Afghan tribal fighters, but the British defeated the Afghans in the concluding engagement.  Initially, the British successfully intervened in a succession dispute between emir Dost Mohammad (Barakzai) and former emir Shah Shujah (Durrani), whom they installed upon conquering Kabul in August 1839.  However, in 1841 the Army of the Indus, numbering between 24,000 and 28,000 including families of soldiers, military and political pundits, suffered a series of defeats at the hands of rebel Afghan tribesmen.  The main British Indian and Sikh force occupying Kabul, having endured harsh winters as well, was almost completely annihilated while retreating in January 1842.  It was one of the first major conflicts during the Great Game, the 19th century competition for power and influence in Central Asia between Britain and Russia.

Ghulam Haider Khan High School: Ghulam Haidar Khan High School is an all-boys school located in Second Phase Khair Khana section of Kabul, Afghanistan.  The school is named after Afghan Prince Ghulam Haidar Khan, son of Emir Dost Mohammad Khan, who fought against the British forces in the July 1839 Battle of Ghazni during the First Anglo-Afghan War.  It has about 10,000 students from seven to twelfth grade in four shifts.

Emirate of Afghanistan: The Emirate of Afghanistan (Pashto: د افغانستان امارت‎ "Da Afghānistān Amārat ") was an emirate between Central Asia and South Asia, which is today's Islamic Republic of Afghanistan.  The emirate emerged from the Durrani Empire, when Dost Mohammed Khan, the founder of the Barakzai dynasty in Kabul, prevailed.  The history of the Emirate was dominated by 'the Great Game' between the Russian Empire and the United Kingdom for supremacy in Central Asia.  This period was characterized by the expansion of European colonial interests in South Asia.  The Emirate of Afghanistan continued the war with the Sikh Empire, which led to the invasion of Afghanistan by British-led Indian forces who completely wiped out the Afghans in 1842 but did not fulfil their initial war objectives.  However, during the Second Anglo-Afghan War, the British again defeated the Afghans and this time the British took control of Afghanistan's foreign affairs until Emir Amanullah Khan regained them after the Anglo-Afghan Treaty of 1919 was signed following the Third Anglo-Afghan War.

Mir Masjidi Khan: "Sahibzada" Mir Masjidi Khan (died 1841) was a celebrated Afghan resistance leader who opposed the installation of Shuja Shah Durrani (or 'Shah Shujah') as Emir of Afghanistan by the Government of British India during the First Anglo-Afghan War.  He kept up a fierce struggle against the occupation forces in and around Kabul and Northern Afghanistan, until his death.

Supporting paragraphs: First Anglo-Afghan War Dost Mohammad Khan (Emir of Afghanistan)
Answer: Barakzai dynasty