Dir has been known in ancient period by various names such as Goraiy, Yaghistan, Biloristan and Masaga. The name Dir was first used in the time of Buddhist Civilization in Panjkora valley. In Arabic Language the word ‘Dir’ means ‘Monastery’ and it was used to describe Buddhist Monasteries constructed on both the banks of River Panjkora. Another ancient name of Dir was Kafiristan as well referring to the Kafirs living there. These Kafirs ruled over the area from 10th to 15th century AD. After 15th century AD, the Yusufzai tribe conquered the area and named it as Dir. It is argued that this name was used for the area because of remoteness of Dir.
The State of Dir was founded in the 17th Century by a religious personality Mulla Ilyas commonly known as Akhund Baba. However the real power was first acquired by his grandson , Ghulam Khan. He was a religious scholar used to preach Islamic education and decided the tribal disputes and conflicts through Islamic tenets with the passage of time he got fame in the Maly Zai area. The Gadi of Khanism was transferred from one person to another till the twentieth century.
However, the golden period is associated to the rule of Khan Ghazan Khan who ruled the state for 46 years from 1822 to 1868. He reorganized his military force and started to take back the areas which were lost by his predecessors.
The Khanism came to an end in 1895, when Muhammad Sharif Khan was made the first Nawab of Dir in 1985 after making an agreement with the British. The accession of Sharif Khan as the first Nawab was brought about a significant change in the political and social setup of Dir.
The State of Dir covered an area of over 3,000 sq. miles and in 1954 , it had a population of nearly 250,000. This also included the country drained by the Panj Kora and its affluents down to its junction with Bajour.
The rivers valleys were fertile and produced fruit in abundance. The forests on the flanks of mountains produce timber in large quantity , which was mostly exported.
With the accession of Dir State to Pakistan, the State made a motor road to join Dir with Malakand. A private telephone line was also been laid between Chakdara and Dir. Similarly a motor-road to link with the towns of the Frontier Province was also initiated to accelerate mutual trade.
For long, a backward region, the people of Dir got awakened in the 1960s and showed signs of progress in many spheres of national life.