# History of Khyber Pakhtunkhwa

The History of Khyber Pakhtunkhwa refers to the history of the modern-day Pakistani province of Khyber Pakhtunkhwa.
The earliest evidence from the region indicates that trade was common via the Khyber Pass; originating from the Indus Valley Civilization. The Vedic culture reached its peak between the 6th and 1st centuries B.C under the Gandharan Civilization, and was identified as a center of Hindu and Buddhist learning and scholarship.
Following Alexander the Great's invasion, the region became part of the Mauryan Empire, followed by the Indo-Greeks, Indo-Scythians and Indo-Parthians.
The region of Gandhara reached its height under Kushan Empire in 2nd and 3rd century AD. Over time the Turk Shahis managed to gain control of the region and ruled starting from around the sixth century, but were later overthrown by the Hindu Shahis. The Hindu Shahis were finally destroyed after the defeat of King Jayapala in A.D 1001 by the Ghaznavids led by Mahmud of Ghazni. After the Ghaznavids, various other Islamic rulers had managed to invade the region, with the most notable being the Delhi Sultanates who had with respect to various dynasties ruled starting from A.D 1206. The Mughals had taken control of the region, and managed to rule until the early 18th century when they were displaced by the rule of the Durranis and briefly by Barakzai Dynasty until early 19th century. After the end of Durrani rule, modern-day Khyber Pakhtunkhwa became part of the Sikh empire, who later lost the territory to the British Empire around 1857, and had ruled until the Indo-Pakistani Independence of 1947. After the independence of Pakistan, the area was renamed Khyber Pakhtunkhwa after widespread petitioning to the Pakistan government by the local Pashtuns. Today, the area is a key province in the war on terror; and aside from terrorism, the province continues to face many developmental challenges.

## Bronze age
### Indus Valley Civilization

During the times of Indus Valley civilisation (3300 BC – 1700 BC) the Khyber Pass through Hindu Kush provided a route to other neighbouring empires and was used by merchants on trade excursions.

## Iron age
### Vedic era

The region of Gandhara, which was primarily based in the area of modern-day Khyber Pakhtunkhwa features prominently in the Rigveda (c. 1500 – c. 1200 BC), as well as the Zoroastrian Avesta, which mentions it as Vaēkərəta, the sixth most beautiful place on earth created by Ahura Mazda. It was one of the 16 Mahajanapadas of Vedic era. It was the centre of Vedic and later forms of Hinduism. Gandhara was frequently mentioned in Vedic epics, including Rig Veda, Ramayana and Mahabharata. It was the home of Gandhari, the princess of Gandhara Kingdom.

## Ancient history
### Alexander's conquests

In the spring of 327 BC Alexander the Great crossed the Indian Caucasus (Hindu Kush) and advanced to Nicaea, where Omphis, king of Taxila and other chiefs joined him. Alexander then dispatched part of his force through the valley of the Kabul River, while he himself advanced into Bajaur and Swat with his light troops. Craterus was ordered to fortify and repopulate Arigaion, probably in Bajaur, which its inhabitants had burnt and deserted. Having defeated the Aspasians, from whom he took 40,000 prisoners and 230,000 oxen, Alexander crossed the Gouraios (Panjkora) and entered the territory of the Assakenoi and laid siege to Massaga, which he took by storm. Ora and Bazira (possibly Bazar) soon fell. The people of Bazira fled to the rock Aornos, but Alexander made Embolima (possibly Amb) his base, and attacked the rock from there, which was captured after a desperate resistance. Meanwhile, Peukelaotis (in Hashtnagar, 17 miles (27 km) north-west of Peshawar) had submitted, and Nicanor, a Macedonian, was appointed satrap of the country west of the Indus.

### Mauryan rule

Mauryan rule began with Chandragupta Maurya displacing the Nanda Empire, establishing the Mauryan Empire. A while after, Alexander's general Seleucus had attempted to once again invade the subcontinent from the Khyber pass hoping to take lands that Alexander had conquered, but never fully absorbed into this empire. Seleucus was defeated and the lands of Aria, Arachosia, Gandhara, and Gedrosia were ceded to the Mauryans in exchange for a matrimonial alliance and 500 elephants. With the defeat of the Greeks, the land was once more under Hindu rule. Chandragupta's son Bindusara further expanded the empire. However, it was Chandragupta's grandson Ashoka, who converted to Buddhism and made it the official state religion in Gandhara and also Pakhli, the modern Hazara, as evidenced by rock-inscriptions at Shahbazgarhi and Mansehra.
After Ashoka's death the Mauryan empire fell to pieces, just as in the west the Seleucid power was waning.

### Indo-Greeks

The Indo-Greek king Menander I (reigned 155–130 BC) drove the Greco-Bactrians out of Gandhara and beyond the Hindu Kush, becoming king shortly after his victory.
His empire survived him in a fragmented manner until the last independent Greek king, Strato II, disappeared around 10 AD. Around 125 BC, the Greco-Bactrian king Heliocles, son of Eucratides, fled from the Yuezhi invasion of Bactria and relocated to Gandhara, pushing the Indo-Greeks east of the Jhelum River. The last known Indo-Greek ruler was Theodamas, from the Bajaur area of Gandhara, mentioned on a 1st-century CE signet ring, bearing the Kharoṣṭhī inscription "Su Theodamasa" ("Su" was the Greek transliteration of the Kushan royal title "Shau" ("Shah" or "King")).
It is during this period that the fusion of Hellenistic and South Asian mythological, artistic and religious elements becomes most apparent, especially in the region of Gandhara.
Local Greek rulers still exercised a feeble and precarious power along the borderland, but the last vestige of the Greco-Indian rulers were finished by a people known to the old Chinese as the Yuezhi.

### Indo-Scythian Kingdom

The Indo-Scythians were descended from the Sakas (Scythians) who migrated from Central Asia into South Asia from the middle of the 2nd century BC to the 1st century BC. They displaced the Indo-Greeks and ruled a kingdom that stretched from Gandhara to Mathura. The first Indo-Scythian king Maues established Saka hegemony by conquering Indo-Greek territories. The power of the Saka rulers declined after the defeat to Chandragupta II of the Gupta Empire in the 4th century.

### Indo-Parthian Kingdom

The Indo-Parthian Kingdom was ruled by the Gondopharid dynasty, named after its first ruler Gondophares. For most of their history, the leading Gondopharid kings held Taxila (in the present Punjab province of Pakistan) as their residence, but during their last few years of existence the capital shifted between Kabul and Peshawar. These kings have traditionally been referred to as Indo-Parthians, as their coinage was often inspired by the Arsacid dynasty, but they probably belonged to a wider groups of Iranic tribes who lived east of Parthia proper, and there is no evidence that all the kings who assumed the title Gondophares, which means "Holder of Glory", were even related.

### Kushan Empire

The Yuezhi nomads had driven the Sakas from the highlands of Central Asia, and were themselves forced southwards by the nomadic Xiongnu. One group, known as the Kushan, took the lead, and its chief, Kadphises I, seized vast territories extending south to the Kabul valley. His son Kadphises II conquered North-Western India, which he governed through his generals. His immediate successors were the fabled Buddhist kings: Kanishka, Huvishka, and Vasushka or Vasudeva, of whom the first reigned over a territory which extended as far east as Benares, far south as Malwa, and also including Bactria and the Kabul valley. Their dates are still a matter of dispute, but it is beyond question that they reigned early in the Christian era. To this period may be ascribed the fine statues and bas-reliefs found in Gandhara and Udyana. Under Huvishka's successor, Vasushka, the dominions of the Kushan kings shrank.

### Turk and Hindu Shahis

The Turk Shahis ruled Gandhara until 870, when they were overthrown by the Hindu Shahis. The Hindu Shahis are believed to belong to the Uḍi/Oḍi tribe, namely the people of Oddiyana in Gandhara.
The first king Kallar had moved the capital into Udabandhapura from Kabul, in the modern village of Hund for its new capital. At its zenith, the kingdom stretched over the Kabul Valley, Gandhara and western Punjab under Jayapala. Jayapala saw a danger in the consolidation of the Ghaznavids and invaded their capital city of Ghazni both in the reign of Sebuktigin and in that of his son Mahmud, which initiated the Muslim Ghaznavid and Hindu Shahi struggles. Sebuk Tigin, however, defeated him, and he was forced to pay an indemnity. Jayapala defaulted on the payment and took to the battlefield once more. Jayapala however, lost control of the entire region between the Kabul Valley and Indus River.
However, the army was defeated in battle against the western forces, particularly against the Mahmud of Ghazni. In the year 1001, soon after Sultan Mahmud came to power and was occupied with the Qarakhanids north of the Hindu Kush, Jaipal attacked Ghazni once more and upon suffering yet another defeat by the powerful Ghaznavid forces, near present-day Peshawar. After the Battle of Peshawar, he died because of regretting as his subjects brought disaster and disgrace to the Shahi dynasty.
Jayapala was succeeded by his son Anandapala, who along with other succeeding generations of the Shahiya dynasty took part in various unsuccessful campaigns against the advancing Ghaznvids but were unsuccessful. The Hindu rulers eventually exiled themselves to the Kashmir Siwalik Hills.

## Medieval period
### Ghaznavids

In 977, Sabuktagin founded the dynasty of the Ghaznavids. In 986 he raided the Indian frontier, and in 988 defeated Jaipal with his allies at Laghman. Soon afterwards he took control of the country as far as the Indus, placing a governor of his own at Peshawar. Mahmud of Ghazni, Sabuktagin's son, having secured the throne of Ghazni, again defeated Jayapala in his first raid into India (1001), Battle of Peshawar, and in a second expedition defeated Anandpal (1006), both near Peshawar. He also (1024 and 1025) raided the Pashtuns. Over time, Mahmud of Ghazni had pushed further into the subcontinent, as far as east as modern day Agra. During his campaigns, many Hindu temples and Buddhist monasteries had been looted and destroyed, as well as many people being forcibly converted into Islam. Local Pashtun and Dardic tribes converted to Islam, while retaining some of the pre-Islamic Hindu-Buddhist and Animist local traditions such as Pashtunwali. In 1179, Muhammad of Ghor took Peshawar, capturing Lahore from Khusru Malik two years later.

### Delhi sultanate

Following the invasion by the Ghurids, five unrelated heterogeneous dynasties ruled over the Delhi Sultanate sequentially: the Mamluk dynasty (1206–1290), the Khalji dynasty (1290–1320), the Tughlaq dynasty (1320–1414), the Sayyid dynasty (1414–1451), and the Lodi dynasty (1451–1526).
Meanwhile, the Pashtuns now appeared as a political factor. At the close of the fourteenth century they were firmly established in their present-day demographics south of Kohat, and in 1451 Bahlol Lodi's accession to the throne of Delhi gave them a dominant position in Northern India. Yusufzai tribes from the Kabul and Jalalabad valleys began migrating to the Valley of Peshawar beginning in the 15th century, and displaced the Swatis of the Bhittani confederation and Dilazak Pashtun tribes across the Indus River to Hazara Division.

## Early modern history
### Mughal empire

Mughal suzerainty over the Khyber Pakhtunkhwa region was partially established after Babar, the founder of the Mughal Empire, invaded the region in 1505 CE via the Khyber Pass. The Mughal Empire noted the importance of the region as a weak point in their empire's defenses, and determined to hold Peshawar and Kabul at all cost against any threats from the Uzbek Shaybanids.
He was forced to retreat westwards to Kabul but returned to defeat the Lodis in July 1526, when he captured Peshawar from Daulat Khan Lodi, though the region was never considered to be fully subjugated to the Mughals.
Under the reign of Babar's son, Humayun, a direct Mughal rule was briefly challenged with the rise of the Pashtun Emperor, Sher Shah Suri, who began construction of the famous Grand Trunk Road – which links Kabul, Afghanistan with Chittagong, Bangladesh over 2000 miles to the east. Later, local rulers once again pledged loyalty to the Mughal emperor.
Yusufzai tribes rose against Mughals during the Yusufzai Revolt of 1667, and engaged in pitched-battles with Mughal battalions in Peshawar and Attock. Afridi tribes resisted Aurangzeb rule during the Afridi Revolt of the 1670s. The Afridis massacred a Mughal battalion in the Khyber Pass in 1672 and shut the pass to lucrative trade routes. Following another massacre in the winter of 1673, Mughal armies led by Emperor Aurangzeb himself regained control of the entire area in 1674, and enticed tribal leaders with various awards in order to end the rebellion.
Referred to as the "Father of Pashto Literature" and hailing from the city of Akora Khattak, the warrior-poet Khushal Khan Khattak actively participated in the revolt against the Mughals and became renowned for his poems that celebrated the rebellious Pashtun warriors.
On 18 November 1738, Peshawar was captured from the Mughal governor Nawab Nasir Khan by the Afsharid armies during the Persian invasion of the Mughal Empire under Nader Shah.

### Durrani Empire

The area fell subsequently under the rule of Ahmad Shah Durrani, founder of the Durrani Empire, following a grand nine-day long assembly of leaders, known as the loya jirga. In 1749, the Mughal ruler was induced to cede Sindh, the Punjab region and the important trans Indus River to Ahmad Shah in order to save his capital from the Durrani attack. Ahmad Shah invaded the remnants of the Mughal Empire a third time, and then a fourth, consolidating control over the Kashmir and Punjab regions. In 1757, he captured Delhi and sacked Mathura, but permitted the Mughal dynasty to remain in nominal control of the city as long as the ruler acknowledged Ahmad Shah's suzerainty over Punjab, Sindh, and Kashmir. Leaving his second son Timur Shah to safeguard his interests, Ahmad Shah left India to return to Afghanistan.
Their rule was interrupted by a brief invasion of the Hindu Marathas, who ruled over the region following the 1758 Battle of Peshawar for eleven months till early 1759 when the Durrani rule was re-established.
Under the reign of Timur Shah, the Mughal practice of using Kabul as a summer capital and Peshawar as a winter capital was reintroduced, Peshawar's Bala Hissar Fort served as the residence of Durrani kings during their winter stay in Peshawar.
Mahmud Shah Durrani became king, and quickly sought to seize Peshawar from his half-brother, Shah Shujah Durrani. Shah Shujah was then himself proclaimed king in 1803, and recaptured Peshawar while Mahmud Shah was imprisoned at Bala Hissar fort until his eventual escape. In 1809, the British sent an emissary to the court of Shah Shujah in Peshawar, marking the first diplomatic meeting between the British and Afghans. Mahmud Shah allied himself with the Barakzai Pashtuns, and amassed an army in 1809, and captured Peshawar from his half-brother, Shah Shujah, establishing Mahmud Shah's second reign, which lasted under 1818.

### Sikh Empire

Ranjit Singh invaded Peshawar in 1818 and captured it from the Durrani Empire. The Sikh Empire based in Lahore did not immediately secure direct control of the Peshawar region, but rather paid nominal tribute to Jehandad Khan of Khattak, who was nominated by Ranjit Singh to be ruler of the region.
After Ranjit Singh's departure from the region, Khattak's rule was undermined and power seized by Yar Muhammad Khan. In 1823, Ranjit Singh returned to capture Peshawar, and was met by the armies of Azim Khan at Nowshera. Following the Sikh victory at the Battle of Nowshera, Ranjit Singh re-captured Peshawar. Rather than re-appointing Jehandad Khan of Khattak, Ranjit Singh selected Yar Muhammad Khan to once again rule the region.
The Sikh Empire annexed the lower parts of Khyber Pakhtunkhwa region following advances from the armies of Hari Singh Nalwa. An 1835 attempt by Dost Muhammad Khan to re-occupy Peshawar failed when his army declined to engage in combat with the Dal Khalsa. Dost Muhammad Khan's son, Mohammad Akbar Khan engaged with Sikh forces the Battle of Jamrud of 1837, and failed to recapture it.
During Sikh rule, an Italian named Paolo Avitabile was appointed an administrator of Peshawar, and is remembered for having unleashed a reign of fear there. The city's famous Mahabat Khan, built in 1630 in the Jeweler's Bazaar, was badly damaged and desecrated by the Sikhs, who also rebuilt the Bala Hissar fort during their occupation of Peshawar.

## British Raj

British East India Company defeated the Sikhs during the Second Anglo-Sikh War in 1849, and incorporated small parts of the region into the Province of Punjab. While Peshawar was the site of a small revolt against British during the Mutiny of 1857, local Pashtun tribes throughout the region generally remained neutral or supportive of the British as they detested the Sikhs, in contrast to other parts of British India which rose up in revolt against the British. However, British control of parts of the region was routinely challenged by Wazir tribesmen in Waziristan and other Pashtun tribes, who resisted any foreign occupation until Pakistan was created. By the late 19th century, the official boundaries of Khyber Pakhtunkhwa region still had not been defined as the region was still claimed by the Kingdom of Afghanistan. It was only in 1893 The British demarcated the boundary with Afghanistan under a treaty agreed to by the Afghan king, Abdur Rahman Khan, following the Second Anglo-Afghan War. Several princely states within the boundaries of the region were allowed to maintain their autonomy under the terms of maintaining friendly ties with the British. As the British war effort during World War One demanded the reallocation of resources from British India to the European war fronts, some tribesmen from Afghanistan crossed the Durand Line in 1917 to attack British posts in an attempt to gain territory and weaken the legitimacy of the border. The validity of the Durand Line, however, was re-affirmed in 1919 by the Afghan government with the signing of the Treaty of Rawalpindi, which ended the Third Anglo-Afghan War – a war in which Waziri tribesmen allied themselves with the forces of Afghanistan's King Amanullah in their resistance to British rule. The Wazirs and other tribes, taking advantage of instability on the frontier, continued to resist British occupation until 1920 – even after Afghanistan had signed a peace treaty with the British.
British campaigns to subdue tribesmen along the Durand Line, as well as three Anglo-Afghan wars, made travel between Afghanistan and the densely populated heartlands of Khyber Pakhtunkhwa increasingly difficult. The two regions were largely isolated from one another from the start of the Second Anglo-Afghan War in 1878 until the start of World War II in 1939 when conflict along the Afghan frontier largely dissipated. Concurrently, the British continued their large public works projects in the region, and extended the Great Indian Peninsula Railway into the region, which connected the modern Khyber Pakhtunkhwa region to the plains of India to the east. Other projects, such as the Attock Bridge, Islamia College University, Khyber Railway, and establishment of cantonments in Peshawar, Kohat, Mardan, and Nowshera further cemented British rule in the region. In 1901, the British carved out the northwest portions of Punjab Province to create the Northwest Frontier Province (NWFP), which was renamed "Khyber Pakhtunkhwa" in 2010.
During this period, North-West Frontier Province was a "scene of repeated outrages on Hindus." During the independence period there was a Congress-led ministry in the province, which was led by secular Pashtun leaders, including Bacha Khan, who preferred joining India instead of Pakistan. The secular Pashtun leadership was also of the view that if joining India was not an option then they should espouse the cause of an independent ethnic Pashtun state rather than Pakistan. In June 1947, Mirzali Khan, Bacha Khan, and other Khudai Khidmatgars declared the Bannu Resolution, demanding that the Pashtuns be given a choice to have an independent state of Pashtunistan composing all Pashtun majority territories of British India, instead of being made to join the new state of Pakistan. However, the British Raj refused to comply with the demand of this resolution, as their departure from the region required regions under their control to choose either to join India or Pakistan, with no third option. By 1947 Pashtun nationalists were advocating for a united India, and no prominent voices advocated for a union with Afghanistan.
The secular stance of Bacha Khan had driven a wedge between the ulama of the otherwise pro-Congress (and pro-Indian unity) Jamiat Ulema Hind (JUH) and Bacha Khan's Khudai Khidmatgars.
There were other tensions in the area as well, particularly those that involved agitations by Pashtun tribesmen against the Imperial government. For example, in 1936, a British Indian court ruled against the marriage of a Hindu girl allegedly converted to Islam in Bannu, after the girl's family filed a case of abduction and forced conversion. The ruling was based on the fact that the girl was a minor and was asked to make her decision of conversion and marriage after she reaches the age of majority, till then she was asked to live with a third party. After the girl's family filed a case, the court ruled in the family's favor, angering the local Muslims who had later gone on to lead attacks against the Bannu Brigade.
Such controversies stirred up anti-Hindu sentiments amongst the province's Muslim population. By 1947 the majority of the ulama in the province began supporting the Muslim League's idea of Pakistan.
Immediately prior to 1947 Partition of India, the British held a referendum in the NWFP to allow voters to choose between joining India or Pakistan. The polling began on 6 July 1947 and the referendum results were made public on 20 July 1947. According to the official results, there were 572,798 registered voters, out of which 289,244 (99.02%) votes were cast in favor of Pakistan, while 2,874 (0.98%) were cast in favor of India. The Muslim League declared the results as valid since over half of all eligible voters backed the merger with Pakistan.
The then Chief Minister Dr. Khan Sahib, along with his brother Bacha Khan and the Khudai Khidmatgars, boycotted the referendum, citing that it did not have the options of the NWFP becoming independent or joining Afghanistan.
Their appeal for boycott had an effect, as according to an estimate, the total turnout for the referendum was 15% lower than the total turnout in the 1946 elections, although over half of all eligible voters backed merger with Pakistan.
Bacha Khan pledged allegiance to the new state of Pakistan in 1947, and thereafter abandoned his goals of an independent Pashtunistan and a united India in favor of supporting increased autonomy for the NWFP within Pakistan. He was subsequently arrested several times for his opposition to the strong centralized rule. He later claimed that "Pashtunistan was never a reality". The idea of Pashtunistan never helped Pashtuns and it only caused suffering for them. He further claimed that the "successive governments of Afghanistan only exploited the idea for their own political goals".

## Post-independence

There had been tensions between Pakistan and Afghanistan ever since Afghanistan voted against Pakistan's inclusion in the United Nations in 1948. After the creation of Pakistan in 1947, Afghanistan was the sole member of the United Nations to vote against Pakistan's accession to the UN because of Kabul's claim to the Pashtun territories on the Pakistani side of the Durand Line. Afghanistan's loya jirga of 1949 declared the Durand Line invalid. This led to border tensions with Pakistan. Afghanistan's governments have periodically refused to recognize Pakistan's inheritance of British treaties regarding the region. As had been agreed to by the Afghan governments following the Second Anglo-Afghan War, and after the treaty ending Third Anglo-Afghan War, no option was available to cede the territory to the Afghans, even though Afghanistan continued to claim the entire region as it was part of the Durrani Empire prior the conquest of the region by the Sikhs in 1818.
During the 1950s, Afghanistan supported the Pushtunistan Movement, a secessionist movement that failed to gain substantial support amongst the tribes of the North-West Frontier Province. Afghanistan's refusal to recognize the Durand Line, and its subsequent support for the Pashtunistan Movement has been cited as the main cause of tensions between the two countries that have existed since Pakistan's independence.
After the Afghan-Soviet War, Khyber Pakhtunkhwa has become one of the areas of top focus for the War against Terror. The province has been reported to struggle with the issues of crumbling schools, non-existent healthcare, and lack of any sound infrastructure while areas such as Islamabad and Rawalpindi receive priority funding.
In 2010 the name of the province changed to "Khyber Pakhtunkhwa". Protests arose among the locals of the Hazara division due to this name change, as they began to demand their own province. Seven people were killed and 100 injured in protests on 11 April 2011.