Saffarid dynasty
The early Arab forces did not fully explore Afghanistan due to attacks by the mountain tribes. Much of the eastern parts of the country remained independent, as part of the Hindu Shahi kingdoms of Kabul and Gandhara, which lasted that way until the forces of the Muslim Saffarid dynasty followed by the Ghaznavids conquered them.