Answer
After internal fighting that resulted in the decline of the Durrani Empire, Abdur Rahman Khan emerged as the leader of the Barakzai dynasty in Afghanistan. He secured his position by defeating rival claimants to the throne and established a strong centralized government, bringing an end to the period of civil war and instability that had plagued the country.