The names found in ancient sources for Swat are Udyana and Suvastu because of the scenic beauty of the valley and the name of the river respectively. Swat has been inhabited for over two thousand years. The first inhabitants were settled in well-planned towns. In 327 BC, Alexander the Great fought his way to Udegram and Barikot and stormed their battlements. In Greek accounts these towns have been identified as Ora and Bazira. Around the 2nd century BC, the area was occupied by Buddhists, who were attracted by the peace and serenity of the land. There are many remains that testify to their skills as sculptors and architects. In the beginning of the 8th century AD, Gabari Royal Tajik tribe advanced through Laghmanat, ningarhar, Dir and invaded Swat, defeating the Bhudist and hindus.This war was headed by Sultan Pakhal Gabari and later on by Sultan Behram Gabari Rulers of Kuner Pich and cousin of Rulers of Balkh and Kashmir. Later some Dilazak encrouched tha area and settled among Gabaris, who in turn were ousted by the Yusufzais which was backed by Mughal Badshah Zahiruddin Muhammad Baber then the super power in 1519 and 1520.This is the historical paradox that The Yusufzais were ousted from Kabul by Mirza Ullegh beg the uncle of Baber and killed 600 malak of Yusufzai where as the Gabaris helped Yousofzais refugees with warm wellcom and settle them in their areas bajour dir and swat and the Yousofzais forgot the generasity of Gabaris and encrouched the Gabari state with the plotted help of Zahiruddin Muhammad babar and Demolished the Gabar-Kot (fortress) in bajour in 1519 and further advanced to the swat and compel the last Gabari King Sultan Awais Gabari to flee to Upper Dir and established his rule in Upper dir,Chitral wakhan,Badakhshan and other upper Oxus pretty states. The originator of the present family of Swat was the Muslim saint Abdul Ghafoor, the Akhund of Swat, a Safi Momand of Hazara district, from where he went to Buner territory. He was a pious man and the people respected him so greatly that they called him AKHUND SAHIB.
It was the mid-19th century when Muslim tribes were fighting against each other for the possession of Swat Valley. On the intervention of the honourable Akhund Sahib, the killing was stopped, and such was his influence that the chiefs of all tribes unanimously made him the ruler of the valley. Akhund Sahib administrated the valley according to Muslim laws. Peace and tranquility prevailed, and agriculture and trade flourished in the territory. Akhund Sahib had two sons by his wife, who belonged to Nikbi Khel.
After the death of Akhund Sahib, the tribal chiefs again started fighting and killing, which continued for years. Eventually the tribal chiefs agreed to give the control of the valley into the hands of the honourable Gul Shahzada Abdul Wadood, the son of Mian Gul Abdul Khaliq, son of Akhund Sahib. The wife of Mian Abdul Wadood was the daughter of Honorable Mirza Afzal-ul-Mulk, the ruler of Chitral. The British by trick put Chitral under the suzerainty of Kashmir. The Chitral ruler gave two horses every year to the Rajia of Kashmir, and the Raja provided Chitral with grain and sugar, etc. Swat thus went under protection of the British.
During the rule of Mian Gul Muhammad, Abdul Haq Jehanzeb, the son of Mian Abdul Wadood, the state acceded to Pakistan in 1947. The present prince, Muhammad Aurzngzeb Khan, son of Jahanzeb, married the daughter of Field Marshal Mohammad Ayub Khan in 1955. Thus by intermarriages with the other castes, the family became a branch of the imperial Gujjars i-e the Royal family of swat wali is belong to the Gurjar Rajput family witch laid down the foundation of swat kingdom. Jahznzeb started a Degree College at Saidu Sahrif, the capital of the State, and four High Schools at Mingora, Chakesar, Matta and Dagar. Fourteen middle schools, twenty-eight lower middle schools, and fifty-six primary schools were established. A girls high school and high class religious schools were established at Saidu Sharif. At all the schools, the poor students were granted scholarships. The state was an exemplary state during British rule. The Gujjars were very poor people in the Swat Valley, but nowadays they have diverted their attention towards education and are holding good posts in government services. They also have a firm stand in politics of Pakistan. The current Prince Aurangzeb Khan was also Governor of Baluchistan.