The Taliban militant group captured major border crossings with Iran and Turkmenistan in a sweeping offensive across northern Afghanistan, officials said.
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 claim their fighters have taken control of 85% of territory in Afghanistan.
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 $20 million 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.
Analysts fear the Taliban could seize control of the entire country within six months.
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.
Peace talks between the government and the Taliban continue, but the talks have regularly stalled and failed to progress significantly.