The North-West Frontier (present-day Khyber Pakhtunkhwa) was a region of the British Indian Empire. It remains the western frontier of present-day Pakistan, extending from the Pamir Knot in the north to the Koh-i-Malik Siah in the west, and separating the modern Pakistani frontier regions of North-West Frontier Province (renamed as Khyber Pakhtunkhwa), Federally Administered Tribal Areas and Balochistan from neighbouring Afghanistan in the west. The borderline between is officially known as the Durand Line and divides Pashtun inhabitants of these provinces from Pashtuns in eastern Afghanistan. The two main gateways on the North West Frontier are the Khyber and Bolan Passes. Since ancient times, the Indian subcontinent has been repeatedly invaded through these northwestern routes. With the expansion of the Russian Empire into Central Asia in the twentieth century, stability of the Frontier and control of Afghanistan became cornerstones of defensive strategy for British India. Much of the Frontier was occupied by Ranjit Singh in the early 19th century, and then taken over by the East India Company when it annexed the Punjab in 1849. Between 1849 and 1947 the military history of the frontier was a succession of punitive expeditions against offending Pashtun (or Pathan) tribes, punctuated by three wars against Afghanistan. Many British officers who went on to distinguished command in the First and Second World Wars learnt their soldiering on the North-West Frontier, which they called the Grim. Contestants Afghanistan In 1747 when Ahmad Khān Abdālī seized control of Kandahar, Kabul, and Peshawar, and, as Ahmad Shah Durrani, was proclaimed Shah of the Afghans. He went on to conquer Herat and Khorassan, and established an empire from the Oxus to the Indus. On his death in 1773, the Afghan domain included Baluchistan, Sindh, the Punjab, and Kashmir. Ahmad Shah was succeeded by his son Timur Shah Durrani, whose rule of twenty years saw the Afghan tide begin to ebb. Timur left many sons but no heir, and the resultant internecine struggles for the throne lasted more than thirty years. During this period the Punjab was effectively ceded to its erstwhile governor Ranjit Singh, Iran recovered Khorassan, and Sindh broke away. In 1813 Sikh forces from the Punjab crossed the Indus and seized the old Mughal fort at Attock. In 1819 Kashmir was lost, and west of the Indus Derajat also. Four years later the winter capital at Peshawar came under attack. In 1826 Dost Mohammad Khan emerged