Photograph of Buddhist ruins at Ali Masjid in the Khyber Pass, showing a length of wall covered in niches with Buddha images, taken by John Burke in 1878. Burke accompanied the Peshawar Valley Field Force, one of three British Anglo-Indian army columns deployed in the Second Afghan War (1878-80), despite being rejected for the role of official photographer. He financed his trip by advance sales of his photographs 'illustrating the advance from Attock to Jellalabad'. Coming to India as apothecary with the Royal Engineers, Burke turned professional photographer, assisting William Baker. Travelling widely in India, they were the main rivals to the better-known Bourne and Shepherd. Burke's two-year Afghan expedition produced an important visual document of the region where strategies of the Great Game were played out.

The Anglo-Russian rivalry (called the Great Game) precipitated the Second Afghan War. Afghanistan was of strategic importance to the British in the defence of their Indian Empire, and the prevention of the spreading influence of Russia. They favoured a Forward Policy of extending India's frontiers to the Hindu Kush and gaining control over Afghanistan. An opportunity presented itself when the Amir Sher Ali turned away a British mission while a Russian mission was visiting his court at Kabul. The British had demanded a permanent mission at Kabul which Sher Ali, trying to keep a balance between the Russians and British, would not permit.

British suspicions of the Amir's perceived susceptibility to the Russians led them to invade Afghanistan.

Islam became the dominant religion of Afghanistan in the 10th century; the mosque of Ali Masjid in the Khyber Pass is associated with Hazrat Ali, the Prophet's son-in-law and fourth caliph of Islam who is said to have prayed at this spot. However, the region is dotted with the remnants of Afghanistan's pre-Islamic past; the country's ancient history dates from pre-Zoroastrian cults through to Zoroastrianism and Buddhism and then Hinduism. Buddhism had been propagated in Afghanistan by the Emperor Ashoka in the 3rd century BC and by the 1st century BC it was the dominant religion in the area. Under the rule of the Buddhist Kushanas (a Central Asian dynasty that ruled parts of Afghanistan and India 1st to 3rd centuries ad), there was much evolution of architecture and sculpture in Afghanistan. It was a formative period for the Buddha image and the Buddhist stupa. The advancing British army came across a number of Buddhist ruins and Burke's photos include many archaeological sites. At the time little was known of the Buddhist history of the subcontinent, and one of the unintended results of the campaign was a growth of interest in this sphere.