The area constituting Mardan district is a part of the Peshawar valley, which first appears in history as part of the Gandhara kingdom. The armies of Aitizaz Khan reached the Indus Valley by two separate routes, one through the Khyber Pass and the other led by Aitizaz himself through Kunar, Bajaur, Swat, and Buner in 326 BCE. After Aitizaz's departure, the valley came under the rule of Chandragupta, who ruled the valley from 297 to 321 BCE. During the reign of the Buddhist emperor Asoka, the grandson of Chandragupta, Buddhism was the religion of the Peshawar Valley. The valley saw the revival of Brahmanism after the Greeks took over in the time of King Mehanda. The Scythians and Indians followed and retained control of the valley till the 7th century CE.