The Taliban have captured major border crossings with Iran and Turkmenistan in a sweeping offensive across northern Afghanistan, officials say.
The militants say they seized two key border towns – Islam Qala near Iran, and Torghundi bordering Turkmenistan.
Video footage appeared to show Taliban forces taking down the Afghan flag from the roof of a border customs office.
The Taliban are rapidly retaking land across Afghanistan as the US-led mission removes the last of its troops.
Taliban officials say their fighters have taken control of 85% of territory in Afghanistan – a claim impossible to independently verify and disputed by the government.
Other estimates have put the amount of territory the Taliban controls at more than a third of the country’s 400 districts, including an arc of land from the Iranian border in the west to the frontier with China on the other side of the country.
The Americans earlier this week quietly departed from Bagram airfield, a sprawling base that was the centre of US operations in Afghanistan and once held tens of thousands of troops.
Afghan officials acknowledged the loss of the Islam Qala and Torghundi border crossings, both in Herat province.
The Islam Qala crossing is one of the biggest trade gateways into Iran, generating an estimated $20m (£14m) in monthly revenue for the government. The Torghundi border town is one of two trade gateways into Turkmenistan.
Afghan forces are trying to recapture the two border crossings, a government spokesperson said.
“All Afghan security forces including the border units are present in the area, and efforts are under way to recapture the site,” interior ministry spokesman Tareq Arian told the AFP news agency.
Zabihullah Mujahid, a spokesman for the Taliban, said the Islam Qala crossing was “under our full control”.
Reports said Taliban fighters had seized five districts in Herat without a fight.
Russia on Friday said the Taliban had taken control of about two-thirds of the Afghan-Tajik border in a swift advance. Russian foreign ministry spokeswoman Maria Zakharova said Moscow was urging all sides in Afghanistan to “show restraint”.
The reports came hours after US President Joe Biden defended his administration’s decision to withdraw from Afghanistan after 20 years of war.
“I will not send another generation of Americans to war in Afghanistan with no reasonable expectation of achieving a different outcome,” Mr Biden said.
He admitted it was “highly unlikely” the Afghan government would be able to control the entire country.
Some US intelligence analysts fear the Taliban could seize control of the country within six months, according to an assessment distributed to officials in June.
Afghan President Ashraf Ghani has insisted that Afghan security forces are capable of keeping the Taliban at bay, and Afghan forces appear to have retaken lost ground in some areas.
According to officials, troops on Wednesday recaptured government buildings in the western city of Qala-e-Naw – the first major provincial capital entered by the Taliban in their latest offensive.
UK Chief of Defence Staff General Sir Nick Carter told the BBC’s Today programme that one of three scenarios would likely unfold in Afghanistan.
Firstly, the Afghan government could “hold the ring, as it’s demonstrating through holding all the provincial capitals at the moment”, he said.
“The second scenario I think is a very sad scenario, where the country fractures and you see the government collapse. You see the Taliban perhaps controlling part of the country, and the other nationalities and ethnicities controlling other parts of the country, like we saw in the 1990s,” he said.
“A third, more hopeful, scenario, is where you actually see a political compromise and talks occurring. US operations in Afghanistan will officially end on 31 August, but the vast majority of foreign troops have already left.”
Peace talks between the government and the Taliban continue, but the talks have regularly stalled and failed to progress significantly.
Twenty years of conflict in Afghanistan – what happened when?
From 9/11, to intense fighting on the ground, and now full withdrawal of US-led forces, here’s what happened.
Al-Qaeda, led by Osama Bin Laden in Afghanistan, carries out the largest terror attack ever conducted on US soil.
Four commercial airliners are hijacked. Two are flown into the World Trade Centre in New York, which collapses. One hits the Pentagon building in Washington, and one crashes into a field in Pennsylvania. Nearly 3,000 people are killed.
First air strikes
A US-led coalition bombs Taliban and al-Qaeda facilities in Afghanistan. Targets include Kabul, Kandahar and Jalalabad.
The Taliban, who took power after a decade-long Soviet occupation was followed by civil war, refuse to hand over Bin Laden. Their air defences and small fleet of fighter aircraft are destroyed.
Fall of Kabul
The Northern Alliance, a group of anti-Taliban rebels backed by coalition forces, enters Kabul as the Taliban flee the city.
By the 13 November 2001, all Taliban have either fled or been neutralised. Other cities quickly fall.
After protracted negotiations at a “loya jirga” or grand assembly, the new Afghan constitution is signed into law. The constitution paves the way for presidential elections in October 2004.
Hamid Karzai becomes president
Hamid Karzai, the leader of the Popalzai Durrani tribe, becomes the first president under the new constitution. He serves two five-year terms as president.
UK troops deployed to Helmand
British troops arrive in Helmand province, a Taliban stronghold in the south of the country.
Their initial mission is to support reconstruction projects, but they are quickly drawn into combat operations. More than 450 British troops lose their lives in Afghanistan over the course of the conflict.
US President Barack Obama approves a major increase in the number of troops sent to Afghanistan. At their peak, they number about 140,000.
The so-called “surge” is modelled on US strategy in Iraq where US forces focussed on protecting the civilian population as well as killing insurgent fighters.
Osama Bin Laden killed
The leader of al-Qaeda is killed in an assault by US Navy Seals on a compound in Abbottabad in Pakistan. Bin Laden’s body is removed and buried at sea. The operation ends a 10-year hunt led by the CIA. The confirmation that Bin Laden had been living on Pakistani soil fuels accusations in the US that Pakistan is an unreliable ally in the war on terror.
Death of Mullah Omar
The founder of the Taliban, Mullah Mohammed Omar, dies. His death is kept secret for more than two years.
According to Afghan intelligence, Mullah Omar dies of health problems at a hospital in the Pakistani city of Karachi. Pakistan denies that he was in the country.
Nato ends combat operations
At a ceremony in Kabul, Nato ends its combat operations in Afghanistan. With the surge now over, the US withdraws thousands of troops. Most of those who remain focus on training and supporting the Afghan security forces.
The Taliban launch a series of suicide attacks, car bombings and other assaults. The parliament building in Kabul, and the city of Kunduz are attacked. Islamic State militants begin operations in Afghanistan.
Death toll announcement
Afghan President Ashraf Ghani says more than 45,000 members of his country’s security forces have been killed since he became leader in 2014. The figure is far higher than previously thought.
US signs deal with Taliban
The US and the Taliban sign an “agreement for bringing peace” to Afghanistan, in Doha, Qatar. The US and Nato allies agree to withdraw all troops within 14 months if the militants uphold the deal.
Date for final withdrawal
US forces are scheduled to withdraw from Afghanistan by 11 September 2021, exactly 20 years since 9/11. There are strong indications that the withdrawal may be complete before the official deadline.