A look at Afghanistan's tumultuous history.
The Taliban has completed a rapid takeover of Afghanistan after the United States and other Western countries ended their near 20-year missions there.
Despite western countries training thousands of Afghan troops, they were unable to push back against Taliban fighters with many observers describing a stunning failure.
For many, the current situation feels like a return to square one when the Taliban ruled Afghanistan in 2001.
Here's a look back at decades of war in Afghanistan.
1973: King overthrown in a coup
Afghanistan had since the 1930s been a monarchy run by Muhammad Zahir Shah. In 1973, however, Zahir Shah was overthrown in a coup by his cousin Mohammad Daoud Khan.
Khan reportedly said the coup would replace the corrupt King with democracy and tried to distance Afghanistan from the Soviet Union.
1978: Civil war begins in Afghanistan
Daoud Khan was killed in a coup d'état in 1978 as the communist political party, the People's Democratic Party of Afghanistan (PDPA), took over in Afghanistan.
The coup became known as the Saur Revolution with communist party leader Nur Muhammad Taraki taking power.
The regime passed Marxist laws including eliminating a dowry for women and allowing them to work, historians Elisabeth Armstrong and Vijay Prashad wrote.
But the communist government was also known for violence, including imprisoning and executing tens of thousands.
1979: The Soviet Union invades Afghanistan
The Red Army invaded Afghanistan on December 24, 1979, airlifting troops into the country.
They installed Babrak Karmal, an exiled leader of one of the communist party's factions in the country, to lead Afghanistan.
The Carter administration in the US, meanwhile, had begun backing the Afghan mujaheddin, rebel fighters who fought against the Soviet Union. Much of the support for the mujaheddin was funnelled through Pakistan.
1988-89: Soviet forces withdraw
The guerilla war and the Cold War proxy conflict between the Soviets and Afghan mujaheddin eventually led to the Red Army withdrawing from the country in defeat.
The 1988 Geneva Accords included a declaration for the United States and the Soviet Union to respect the independence and sovereignty of Afghanistan and Pakistan and to refrain from interfering.
The Soviets continued to support the communist government in Afghanistan until 1992 as fighting between the government and mujaheddin continued.
1992-1996: Factions fight for power in Afghanistan
Fighting between mujaheddin factions continued in Afghanistan after Najibullah, the Soviet-backed leader, resigned.
The United Nations tried unsuccessfully to find a solution to a situation made more complicated by outside influence and civil war.
Thousands were estimated to have been killed in Kabul in 1994, many of whom were killed in rocket attacks.
"Outside forces saw instability in Afghanistan as an opportunity to press their own security and political agendas," a Georgetown University National Security Archive document reads.
"Among them were terrorist groups such as Osama Bin Laden's al-Qaeda network and states such as Pakistan, Iran, Russia, and India. Pakistan, for example, saw an unstable Afghanistan as a boon for its internal security, allowing it a strategic depth against India."
1996-2001: Taliban take over Afghanistan
The Taliban, a radical group with support from Pakistan and Saudi Arabia, seized Kabul in September 1996.
Under Taliban rule, women and girls were banned from school and work. They were not allowed to leave the house without a man or show any skin, according to Amnesty International. Punishments for the failure to comply with the strict rules were harsh.
They also allowed al Qaeda and Saudi radical Osama bin Laden to operate in Afghanistan. In response to three embassy bombings, the US bombed three training bases used by bin Laden.
The UN Security Council imposed sanctions on the Taliban in 1999, insisting the group turn over bin Laden. Those sanctions included an arms embargo from 2000 after the Taliban did not comply.
On September 9, 2001, anti-Taliban leader Ahmad Shah Massoud was killed by al-Qaeda in what many now view as a precursor to the attacks on New York and Washington.
Nearly 3,000 people died in the September 11, 2001 attacks on New York and Washington, prompting a dramatic change of events.
US President George W. Bush said the search was "underway for those who are behind these evil acts".
"We will make no distinction between the terrorists who committed these acts and those who harbour them." A few days later, Bush authorised the use of force against those responsible for the attacks.
Airstrikes from US and British forces began on October 7, 2001, and mainly consisted of targeting the Taliban.
Eventually, a new government is installed in December 2001 in Kabul with an international peacekeeping force to maintain security. The Taliban regime ended in December 2001 after the group fled Kandahar.
By 2002, US President Bush called for a Marshall Plan-like reconstruction in Afghanistan; a transitional government under Hamid Karzai was instituted in the country with the first elections occurring in 2004.
The North Atlantic Treaty Organisation (NATO) took over the International Security Assistance Force (ISAF) in Afghanistan on August 11, 2003, with the goal of providing security across the country. The force was originally in Kabul but expanded throughout the country in 2006.
It was meant to train Afghan forces to eventually take over security in the country.
US President Barack Obama stepped up the mission in 2009, stating he would send an additional 30,000 troops to Afghanistan but that he planned to withdraw forces by 2011.
US forces in Pakistan killed Osama bin Laden in May 2011, prompting discussion of the continued military presence in Afghanistan. US President Obama said a month later that he planned to draw down troops in the country.
Although he tried to draw down troops by 2014, he said that the security situation remained precarious, stating that thousands of troops would remain in the country.
In 2020, the Trump administration signed a peace agreement with the Taliban ensuring the withdrawal of US troops and a prisoner exchange but the Afghan government said they were not part of the deal.
Eventually, in April 2021, newly elected US President Joe Biden announced a complete withdrawal of US forces by September 11. The Taliban insurgency subsequently ramped up, leading to their takeover of the country by August.
The US-led war in Afghanistan resulted in the deaths of at least 157,000 people, according to a 2019 report from Brown University's Costs of War project. The project estimates that 5.3 million people were displaced either internally or by leaving the country.
A US Defence Department report in March 2021 estimated that the war and reconstruction cost the department $837.3 billion (€710.9 billion), with other estimates reaching nearly $1 trillion.