The Taliban have entered a key city in western Afghanistan as they continue a rapid advance before Nato troops leave.
All government officials in Qala-e-Naw, provincial capital of Badghis province, had been moved to a nearby army base, the local governor told the BBC.
He said the militants were moving "towards the centre of the city" and there was heavy fighting with government troops.
The Taliban gains come as the US, UK and allies withdraw after 20 years.
The vast majority of remaining foreign forces in Afghanistan have left ahead of an 11 September deadline, leaving the Afghan military in charge of security on their own.
Local sources have told the BBC the Taliban moved on the prison in Qala-e-Naw and freed about 400 inmates, including more than 100 of the group's fighters.
Afghan forces guarding the prison are reported to have surrendered without a fight.
The Taliban have seized dozens of districts in recent weeks and are now thought to control about a third of the country, making new gains on a daily basis. So far provincial capitals have remained under government control.
Under a deal with the Taliban, the US and its Nato allies agreed to withdraw all troops in return for a commitment by the militants not to allow any extremist group to operate in the areas they control.
But the Taliban did not agree to stop fighting Afghan forces, whose ability to keep the insurgents at bay is being questioned.
Military officials in Kabul have talked about "tactical retreat" whenever insurgents make gains, but commanders in the battlefield have told the BBC about a lack of ammunition, and delays in sending support.
President Ashraf Ghani insists that Afghan security forces are fully capable of keeping insurgents at bay, but more than 1,000 Afghan troops fled to neighbouring Tajikistan in recent days, and there have also been reports of more soldiers seeking refuge in Pakistan and Uzbekistan to escape the fighting.
Neighbouring countries are bracing themselves for a potential influx of refugees if the fighting continues to intensify.
Taliban spokesman Suhail Shaheen told the BBC earlier this week that the group was not responsible for the recent increase in violence. He insisted that many districts had fallen to the Taliban through mediation after Afghan soldiers refused to fight.
For the people of Afghanistan, it is a worrying time. The Taliban, who have been accused of various human rights and cultural abuses, support punishments such as public executions of convicted murderers - as well as banning television, music and cinema, and disapproving of girls over 10 going to school.
US-led forces ousted the Taliban from power in Afghanistan in 2001. The group had been harbouring Osama Bin Laden and other al-Qaeda figures linked to the 9/11 attacks in the US that triggered the invasion. However, it has gradually been regaining territory in recent years.
The Taliban entered direct talks with the US in 2018, and President Joe Biden has said the American pull-out is justified as US forces have made sure Afghanistan cannot become a base for foreign jihadists to plot against the West again.