Dir, or Dir Khas, a town in Upper Dir District, lies at an elevation of 1420 metres, in the north of Khyber Pakhtunkhwa. It lies at the foot of the Lowarai Pass on the Dir River and was the capital of the princely state of Dir until it was abolished in 1969. Just east of Dir is the Swat District, in a valley of the Swat River. Its capital is Saidu Sharif, and its largest city is Mingora, just to its north; further north along the river are the towns of Bahrain and Kalam.
The princely state of Dir was founded in the 17th century as a Muslim khanate and, during the time of British India, was ruled by hereditary rulers, referred to as “Nawab”. On 8 February 1948, the Nawab, Jahan Khan, united his princely state with Pakistan. However, Jahan Khan was a tyrannical leader. After revolts in 1959 and 1960, the Pakistani president, General Yahya Khan, exiled him; on 28 July 1969, Dir State ceased to exist, and the royal status of the Nawabs was abolished in 1972.
The Yousafzai State of Swat was a kingdom established in 1849 and was ruled by chiefs known as Akhund, a Persian title for an Islamic scholar. Before that, the region had been led by religious leaders of Yousafzai Pashtun tribes. In 1926 the British recognised the ruler Miangul Golshahzada Abdul-Wadud, who had been proclaimed the Wāli of Swat that year. He acceded to Pakistan in 1947. His eldest son, Miangul Jahan Zeb, succeeded him in 1949 and in 1969, Swat ceased to exist as a separate state like the other princely states.
The Tehrik-i-Taliban seized the region in late-2007 until Pakistani control was re-established in mid-2009. But on 9 October 2012, while on a bus in the Swat District, Malala Yousafzai, a then 15-year old girl who had become a prominent activist for female education, was shot in the head by a Pakistani Taliban gunman. It left her critically injured, but she recovered and became an even more prominent activist for the right to education, earning her a Nobel Peace Prize in 2014.