 It has been part of the Achaemenids followed by the Seleucids, Mauryans, Kushans, Kabul Shahis, Saffarids, Samanids, Ghaznavids, Ghurids, Khwarazmians, Qarlughids, Khaljis, Timurids, Mughals, and Hotaks, until finally becoming part of the Durrani Empire (also known as the "Afghan Empire") in 1747.Kabul became the capital of Afghanistan in 1776, during the reign of Timur Shah Durrani, the son of Ahmad Shah Durrani.In the early 19th century, the British occupied the city, but after establishing foreign relations, they were compelled to withdraw all forces from Afghanistan.