In the 1980s, the United States backed a coalition of so-called "mujahideen" militants in their fight against Soviet occupation.
As Soviet forces withdrew, the country was plunged into a bloody civil war.
In 1994, the Taliban emerged from among the formally US-backed "mujahideen" fighters and went on to control most of the country by 1996.
They quickly imposed strict Islamic laws over the people of Afghanistan.
The group's founder and original leader was Mullah Mohammad Omar.
After the September 11 attacks on the United States in 2001, the US toppled the Taliban.
Mohammad Omar went into hiding, and his whereabouts was so secretive that his death, in 2013, was only confirmed two years later by his son.
But now the Taliban say their leaders will no longer live in secret. Here are some of the key figures in the movement.
Haibatullah Akhundzada
Known as the "Leader of the Faithful", Islamic legal scholar Haibatullah Akhundzada is the Taliban's supreme leader who holds final authority over the group's political, religious, and military affairs.
Akhundzada took over when his predecessor, Akhtar Mansour, was killed in a US drone strike near the Afghan-Pakistan border in 2016.
For 15 years, until his sudden disappearance in May 2016, Akhundzada taught and preached at a mosque in Kuchlak, a town in south-western Pakistan, associates and students have told Reuters.
He is believed to be aged around 60 years old.
The Taliban's supreme leader has three deputies: Mawlavi Yaqoob, son of Mullah Omar; Sirajuddin Haqqani, leader of the powerful militant Haqqani network; and Abdul Ghani Baradar, who heads the Taliban's political office in Doha and is one of the founding members of the group.
Mullah Abdul Ghani Baradar
Reported to have been one of Mullah Omar's most trusted commanders, Mullah Abdul Ghani Baradar was captured in 2010 by security forces in the southern Pakistani city of Karachi and released in 2018, after which he relocated to Qatar.
He now heads the political office of the group and was part of the negotiating team it had in Doha to try and thrash out a political deal.
The process failed to make significant headway and became redundant as the US forces withdrew.
He returned to Afghanistan for the first time in more than 10 years on Tuesday, arriving in the southern city of Kandahar from Qatar with several other members of the Taliban's senior leadership.
He was expected in Kabul sometime this week, having been warmly greeted in Kandahar.
Mullah Mohammad Yaqoob
The son of Taliban founder Mullah Omar, Mullah Mohammad Yaqoob oversees the group's military operations.
He was proposed as overall leader of the movement during various succession tussles, but he put forward Akhundzada in 2016 because he felt he lacked battlefield experience and was too young, according to a Taliban commander at the meeting where Mansour's successor was chosen.
Yaqoob is believe to be in his early 30s.
Sirajuddin Haqqani
The son of prominent mujahideen commander Jalaluddin Haqqani, Sirajuddin Haqqani leads the Haqqani network, a loosely organised group that oversees the Taliban's financial and military assets across the Pakistan-Afghanistan border.
The Haqqanis are believed by some experts to have introduced suicide bombing to Afghanistan and have been blamed for several high-profile attacks in Afghanistan including a raid on Kabul's top hotel, an assassination attempt on then-president Hamid Karzai and a suicide attack on the Indian embassy.
Haqqani is believed to be in his late 40s or early 50s.
Sher Mohammad Abbas Stanekzai
A former deputy minister in the Taliban's government before its ouster, Sher Mohammad Abbas Stanekzai has lived in Doha for nearly a decade, and became the head of the group's political office there in 2015.
He has taken part in negotiations with the Afghan government, and has represented the Taliban on diplomatic trips to several countries.
Abdul Hakim Haqqani
Abdul Hakim Haqqani was the head of the Taliban's negotiating team in Qatar.
The Taliban's former shadow chief justice heads its powerful council of religious scholars and is widely believed to be someone whom Akhundzada trusts most.
During the negotiations, a Taliban official told Reuters: "[His] presence basically means our supreme leader himself will attend the peace talks."
Suhail Shaheen
Suhail Shaheen is a Doha Taliban spokesman and was a member of the negotiation committee.
He edited the English-language, state-owned Kabul Times during the Islamic Emirate of Afghanistan, before being appointed to the Afghan embassy in Pakistan as deputy ambassador.
He has featured prominently in the media since the fall of Kabul on Monday.
Zabihullah Mujahid
Another Taliban spokesman, Zabihullah Mujahid is the official voice for the group on the ground in Afghanistan and has provided most of the military updates.
He has been a spokesman for the group since 2007 but only revealed himself to the public this week.
Prior to that, he only communicated with journalists via telephone, email, social media and website.
Some speculated that several people were acting in the role of spokesman using the same name.
ABC/Reuters