The History of Khyber Pakhtunkhwa refers to the history of the modern-day Pakistani province of Khyber Pakhtunkhwa, including the former Federally Administered Tribal Areas, which has colloquially been referred to as Pashtunistan. The earliest evidence from the region indicates that trade was common via the Khyber Pass; originating from the Indus Valley Civilization. The early people of the region were a Vedic people known as the Pakthas, identified with the modern day Pakhtun peoples. 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.
The area saw a brief shock during the invasions of Alexander the Great, which had managed to conquer the small Janapadas, or city states, that had ruled the region. Seizing the resulting instability and inexperience of the local Greek governors, a young prince named Chandragupta Maurya managed to take control of the area, eventually going on to conquer much of Northern India. Over time the Mauryan Empire, from Chandragupta’s line, had gone on to conquer much of the Indian Subcontinent with the Empire reaching its peak under King Ashoka. Ashoka had converted to Buddhism from Hinduism, and with his conversion, declared that the official state religion of the Empire was the former. Ashoka’s rule had witnessed a rise in Buddhism throughout India, although Hinduism was not displaced. After Ashoka’s death, the Mauryan Empire had crumbled under the weak rule of the later Kings.
With the disintegration of the centralized Mauryan Empire, the Northwest frontier was once again ruled by small Kings and Chieftains. Brief invasions from nomadic tribes to the north of the Khyber pass had also resulted in new displacements across the region, but nevertheless, had resulted in the maintenance of Hindu rule. Over time the Shahis, who had often alternated between Hinduism and Buddhism, had managed to gain control of the region and ruled starting from around the first century A.D. The Shahis were initially based in what is now Afghanistan, but Turkic invasions had forced a relocation further south into Peshawar. The 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 rule of the Delhi sultanates was characterized by near constant wars, with a notable example being the repulsion of a Mongol force led by Genghis Khan. Nevertheless, after the battle of Panipat in A.D 1526, 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 was very briefly ruled by Sikh from the east, who could not subjugate the tribal region of Khyber Pakhtunkhwa and were defeated in Battle of Jamrud by Afghan army of Barakzai Dynasty.