Barakzai dynasty
It was given to Ahmad Shah Durrani by Murad Beg of Bukhara after a treaty of friendship was reached in or about 1750, and became part of the Durrani Empire. It was ruled by the Durranis followed by the Barakzai dynasty and was untouched by the British during the three Anglo-Afghan wars that were fought in the 19th and early 20th centuries.