The Taliban say they have captured a prison in the northern Afghan province of Jawzjan and freed all of the prisoners.
Video on social media shows hundreds of inmates leaving the jail in the city of Sheberghan on Saturday after the insurgents launched an attack.
The Taliban have taken control of the city, making it the second regional capital to fall to the militants.
It is a major blow to security forces, as battles escalate across the country.
Sheberghan is a stronghold of the former Afghan vice-president and warlord, Abdul Rashid Dostum, whose supporters have been leading the fight against the insurgents.
Local media reports that 150 people travelled to the city to help Afghan forces.
The Taliban first took control of the governor's compound on Friday during intense fighting, before it was retaken by Afghan security forces.
However, the region's council chief, Babur Eshchi, told the BBC the militants were now in control of the whole city, except an army base, where fighting was still going on.
The region's deputy governor told AFP news agency that government officials had retreated to the airport.
Violence is also raging in other parts of the country, as the Taliban continue to make rapid advances, displacing thousands of civilians.
The city of Zaranj, in Nimroz province, was the first regional capital to fall to the insurgents on Friday.
Other provincial capitals under pressure include Herat in the west, and the southern cities of Kandahar and Lashkar Gah.
In the Afghan capital Kabul, the Taliban shot dead President Ashraf Ghani's former spokesman and carried out a bomb attack on the house of the acting defence minister.