The histories of Dir, Swat, Bajaur, and Utman Khel are so inextricably intermingled that it has been found impossible to treat them separately.
The first historical mention of these countries is made by Arrian, who records that in 326 B.C. Alexander led his army through Kunar, Bajaur, Swat, and Buner; but his successor, Seleucus, twenty years later made over these territories to Chandragupta. The inhabitants were in those days of Indian origin, Buddhism being the prevailing religion, and they remained thus almost undisturbed under their own kings until the fifteenth century. They were the ancestors of the non-Pathan tribes, e.g. Gujars, Torwals, Garhwis, &c., who are now confined to Bashkar of Dir, and Swat Kohistan.
The invasion of the Yusufzai and other Pathan tribes of Khakhai descent, aided by the Utman Khel, then began; and by the sixteenth century the Yusufzai were in possession of Buner, Lower Swat, and the Panjkora valley; the Gigianis and Tarkilanris had established themselves in Bajaur, and the Utman Khel in the country still occupied by them. The advent of these Pathan invaders introduced the Muhammadan religion throughout these countries.
At this time the emperor Babar, by a diplomatic marriage with the daughter of Malik Shah Mansur, the head of the Yusufzai clans, and by force of arms, established his sovereignty throughout Bajaur (except Jandol), the Panjkora valley as far as its junction with the Bajaur, and Lower Swat. Upper Swat, which was still held by the aboriginal Swatis under Sultan Udais or Wais, tendered a voluntary submission, claiming protection from the invader, which Babar gave. In Humayun’s reign, however, the advance was continued, and the Yusufzai overran the Sheringal portion of Dir and Upper Swat as far as Ain, beyond which they have scarcely advanced to this day. Humayun’s yoke was rejected by them, and even Akbar in 1584 could exact no more than a nominal submission. Such degree of peace as obtains amongst independent Pathan tribes was enjoyed by the Yusufzai and their neighbors, until a fruitful cause of dissension arose in Dir in the person of a religious reformer named Bazid, called by his adherents the Pir-i-Roshan, whose chief opponent was Akhund Darweza Baba, the historian of the Yusufzai.
The heresy of the Pir and the constant depredations of the combatants on either side at length compelled interference. Zain Khan, Kokaltash, was deputed by the governor of Kabul to bring the tribes to reason, and after five years fighting and fort-building he effected in 1595 a thorough conquest of the country. By 1658, however, in which year Aurangzeb ascended the throne, the lesson had been forgotten. The tribes refused to pay revenue, declared their independence, and maintained it till the time of Nadir Shah, whose successors, Ahmad Shah Durrani and Timur Shah, kept their hold on the country. The grasp was not altogether lost by those who came after, and when Azim Khan attacked the Sikhs in 1823, the Yusufzai sent a large contingent with his army. They were defeated, and Ranjit Singh entered Peshawar, but did not essay a farther advance into the northern hills.
Imperial Gazetteer of India, Provincial Series, North West Frontier Province, Superintendent of Government Printing Press, Calcutta, 1908, Pages 217-218.