Answer
The Barakzai Dynasty was founded by Dost Mohammad Khan, the grandfather of Abdur Rahman Khan. Dost Mohammad Khan rose to power in the early 19th century during a period of political instability in Afghanistan. He established the Barakzai Dynasty in 1826 and ruled until his death in 1863. The Barakzai Dynasty continued to rule Afghanistan until the mid-20th century.