Afghanistan: a history from Bactria to the Taliban

Pakistan's western neighbour shares its history from Gandhara to the Mughals. Pakistan sheltered millions of Afghan refugees for four decades, and the two countries remain bound by trade, family and security.

By Last reviewed

Afghanistan
Afghanistan and its neighbours. Borders approximate.

Key facts

Capital
Kabul
Independence
Treaty of Rawalpindi, 8 August 1919; celebrated on 19 August
Population
About 42 million
Languages
Pashto and Dari
Government
Taliban administration since August 2021
Border with Pakistan
The Durand Line, about 2,600 km long, which Pakistan recognises as the international border

Through the ages

The main periods of Afghanistan's history, 1500 BCE to today. Recent centuries are drawn wider so they can be read.

  1. Bactria and the Achaemenids1500 BCE to 330 BCE
  2. Greeks, Mauryas and Kushans330 BCE to 375 CE
  3. Hephthalites and Buddhist kingdoms375 CE to 870 CE
  4. Ghaznavids and Ghurids977 CE to 1215
  5. Mongols, Timurids and Mughals1221 to 1747
  6. Durrani Empire and the Barakzai kingdom1747 to 1973
  7. Republic, Soviet war and civil war1973 to 2001
  8. Republic and the return of the Taliban2001 to today

Timeline

  1. c. 500 BCE
    Empires and dynasties

    Bactria and Gandhara

    Bactria in the north and Gandhara in the east, which also covered the Peshawar valley, become provinces of the Persian Achaemenid Empire.

  2. 329 BCE
    Wars and conflict

    Alexander the Great

    Alexander crosses the Hindu Kush. Greek kingdoms in Bactria last for two centuries after him.

  3. c. 127 CE
    Empires and dynasties

    Kanishka and the Kushans

    The Kushan emperor Kanishka rules from Bactria to the Ganges, with a capital at Peshawar. Buddhism and Gandhara art spread across the region.

  4. c. 600 CE
    Culture and faith

    The Buddhas of Bamiyan

    Two giant standing Buddhas are carved into a cliff at Bamiyan on the Silk Road.

  5. 998 CE
    Empires and dynasties

    Mahmud of Ghazni

    Mahmud becomes ruler of the Ghaznavids and leads raids deep into India. Lahore later becomes the dynasty's eastern capital.

  6. c. 1190
    Empires and dynasties

    The Minaret of Jam

    The Ghurids raise the Minaret of Jam. In 1192 Muhammad Ghori defeats Prithviraj Chauhan at Tarain, opening northern India to Muslim rule.

  7. 1504
    Empires and dynasties

    Babur takes Kabul

    Babur captures Kabul and uses it as his base to conquer India in 1526. He asks to be buried in Kabul, where his garden tomb still stands.

  8. 1747
    Empires and dynasties

    Ahmad Shah Durrani

    A Pashtun jirga at Kandahar chooses Ahmad Shah Durrani as king. His empire is often seen as the beginning of modern Afghanistan.

  9. 1839 to 1842
    Wars and conflict

    The First Anglo-Afghan War

    A British invasion ends in disaster when the army retreating from Kabul is destroyed in January 1842.

  10. 1893
    Treaties and agreements

    The Durand Line

    Amir Abdur Rahman Khan and British India agree the Durand Line. Pakistan inherited it in 1947 and recognises it as the international border.

  11. 8 August 1919
    Independence

    The Treaty of Rawalpindi

    After the Third Anglo-Afghan War, Britain recognises Afghanistan's full independence in a treaty signed at Rawalpindi.

  12. 30 September 1947
    Politics

    A vote against Pakistan

    Afghanistan casts the only vote against Pakistan's admission to the United Nations, over the border question. It withdraws the objection weeks later.

  13. December 1979
    Wars and conflict

    The Soviet invasion

    Soviet troops invade. More than three million Afghans flee to Pakistan, which becomes the main base of the resistance.

  14. 14 April 1988
    Treaties and agreements

    The Geneva Accords

    Pakistan and Afghanistan sign the Geneva Accords, with the US and the Soviet Union as guarantors. Soviet troops leave by February 1989.

  15. 2001
    Wars and conflict

    US-led invasion

    After the September 11 attacks, a US-led coalition removes the first Taliban government. A twenty-year war follows.

  16. 15 August 2021
    Politics

    The Taliban return

    The Taliban enter Kabul as US forces withdraw and the republic collapses.

  17. October 2025
    Wars and conflict

    Border clashes and a ceasefire

    Fighting breaks out along the border after Pakistan accuses the Taliban of sheltering militants who attack Pakistan. Qatar and Türkiye broker a ceasefire in Doha.

Crossroads of empires

Afghanistan sits where Central Asia, Iran and South Asia meet, and armies, traders and faiths have crossed its mountain passes for thousands of years. In ancient times the north was Bactria, a rich land of cities, and the east belonged to Gandhara, the region that also covered the Peshawar valley in today’s Pakistan. Both were provinces of the Persian Empire before Alexander the Great crossed the Hindu Kush in 329 BCE. Greek kings ruled Bactria for two centuries. Then the Kushans built an empire that stretched from Central Asia to the Ganges, with a capital at Peshawar; under Kanishka, Buddhism and the Gandhara style of art spread across the region. At Bamiyan, monks carved two giant Buddhas into a cliff, which stood until the first Taliban government blew them up in 2001.

Ghazni, Ghor and the road to India

Islam spread across the region from the seventh century. In the late tenth century the Ghaznavids made Ghazni the capital of an empire, and Mahmud of Ghazni raided deep into India. Lahore became the dynasty’s eastern capital, and the scholar Ali Hujwiri, honoured today as Data Ganj Bakhsh, came from Ghazni to Lahore. The Ghurids who followed raised the Minaret of Jam and, under Muhammad Ghori, defeated Prithviraj Chauhan in 1192, opening northern India to Muslim rule. Later the Mongols, the Timurids and the Mughals ruled the region. Babur took Kabul in 1504 and from there conquered India; at his wish he was buried in a garden in Kabul.

The Afghan kingdom and the British

In 1747 a jirga at Kandahar chose Ahmad Shah Durrani as king, and his empire, which at its height reached Delhi and Kashmir, is often seen as the birth of modern Afghanistan. In the nineteenth century the country was caught between British India and Russia. Britain invaded twice; its army was destroyed on the retreat from Kabul in 1842. In 1893 Amir Abdur Rahman Khan agreed the Durand Line with British India. After a third war in 1919, the Treaty of Rawalpindi recognised Afghanistan’s full independence.

Afghanistan and Pakistan

When Pakistan was created in 1947, Afghanistan cast the only vote against its admission to the United Nations, over the border, though it later withdrew the objection. Pakistan inherited the Durand Line and recognises it as the international border. After the Soviet invasion of 1979, more than three million Afghans fled to Pakistan, which became the base of the resistance and has hosted refugees ever since. The Geneva Accords, signed by Pakistan and Afghanistan in 1988, led to the Soviet withdrawal. Civil war followed, then the first Taliban government, a US-led invasion in 2001 and twenty years of war that ended when the Taliban returned to Kabul on 15 August 2021. Since then Pakistan has pressed the Taliban to act against militants of the Tehreek-e-Taliban Pakistan who attack Pakistan from Afghan soil, and in October 2025 clashes along the border ended in a ceasefire brokered by Qatar and Türkiye. Trade through Torkham and Chaman, and family ties across the border, still bind the two peoples closely.

For our latest reporting on Afghanistan, see the news listed on this page.

Landmarks and heritage

Late 12th century

Minaret of Jam

Ghor province

A 65-metre brick minaret of the Ghurid dynasty in a remote valley. A UNESCO World Heritage Site.

1st to 13th centuries

Bamiyan Valley

Bamiyan

Buddhist monasteries and the niches of the giant Buddhas destroyed in 2001. A UNESCO World Heritage Site.

16th century

Gardens of Babur

Kabul

The terraced garden where the founder of the Mughal Empire is buried.

15th century, rebuilt

Blue Mosque of Mazar-i-Sharif

Mazar-i-Sharif

A tiled shrine that is one of the most visited places in the country.

Terms you will meet in the news

Durand Line
The 1893 boundary between British India and Afghanistan, which Pakistan recognises as its international border.
Loya jirga
A grand assembly of tribal and community leaders called to settle national questions.
Gandhara
The ancient region around Peshawar and eastern Afghanistan, famous for its Buddhist art.
Torkham
The main border crossing between Pakistan and Afghanistan, at the top of the Khyber Pass.

Quick answers

Does Pakistan recognise the Durand Line?

Yes. Pakistan inherited the 1893 Durand Line in 1947 and recognises it as its international border with Afghanistan. Afghan governments have disputed it.

How many Afghan refugees did Pakistan host?

At the height of the Soviet war, more than three million. Pakistan has hosted Afghan refugees for over four decades.

When did Afghanistan become independent?

Britain recognised its full independence in the Treaty of Rawalpindi of 8 August 1919. Afghans mark independence on 19 August.

Who rules Afghanistan today?

The Taliban, who took Kabul on 15 August 2021. Most countries have not formally recognised their government.

Sources and further reading

Compiled by The Indus Compass from the sources above and standard reference works, and reviewed 29 November 2026. Dates before the modern era are approximate and some are debated by historians. Spotted a mistake? Tell the newsroom and we will correct it.