Afghan security forces recaptured a district headquarters in western Farah province on Monday, just hours after the Taliban overrun the police and administrative offices, killing eight policemen including their local commander, a spokesman said.
The development came as insurgent attacks against security forces have stepped up across Afghanistan, including in Farah province.
In Monday's assault, the Taliban launched a multi-pronged attack and stormed the district headquarters in Anar Dara, which they were able to hold on to for a few hours before Afghan reinforcements arrived.
The fighting in Farah underlines the continuing strength of the Taliban movement, which controls or contests almost half of Afghanistan, and has so far rejected peace overtures from President Ashraf Ghani.
Nasrat Rahimi, deputy spokesman for the Interior Ministry, says that along with the eight killed in the assault, 10 security forces were wounded in the morning attack.
"Right now the district headquarters and the area around it are under control of the Afghan security forces," Rahimi said, adding that "fighting is ongoing in three different parts of the district" as Afghan forces pursue the Taliban.
The Afghan forces also carried out heavy airstrikes during the day in Anar Dara and more than 50 Taliban fighters were report killed so far, he added.
Fared Bakhtawer, the head of provincial council in Farah, confirmed the developments and said the Taliban have been surrounded in other parts of the district.
"The Afghan forces have warned the Taliban either to surrender or die on the battle field," said Bakhtawer.
The Taliban claimed responsibility for the attack shortly after it began, according to a media statement from Qari Yusouf Ahmadi, a Taliban spokesman. He said 15 policemen had been killed and several military vehicles seized, along with a large quantity of ammunition.
The Anar Dara attack followed a weekend assault in Bala Buluk district that killed 15 Afghan forces — seven army commandos and eight policemen.
In a separate report, seven civilians — including three children and two women — were killed on Sunday night in eastern Nangarhar province when their vehicle was hit by a grenade, said Attahullah Khogyani, spokesman for the provincial governor.
Khogyani said two other people in the vehicle were wounded in the attack in Bati Kot district. The victims are all members of a single family, he added.
No group immediately claimed responsibility for the attack but both the Taliban and the Daesh group are active in eastern Afghanistan, particularly in Nangarhar province.
No comment was immediately available from U.S. military headquarters in Kabul.
Afghan and U.S. commanders have been relatively upbeat about the course of the war since U.S. President Donald Trump announced a new and more robust military strategy last year, with more air strikes and greater support for Afghan forces.
The pressure on Farah has grown as U.S. air strikes and Afghan army operations have inflicted heavy casualties on Taliban fighters in neighbouring Helmand province, the country's main opium-growing region and a heartland of the insurgency.
In January, the governor of Farah resigned, blaming political interference and corruption. Residents of Farah city have complained bitterly about security in the province, where some police units are alleged to collude with Taliban fighters, selling them weapons and ammunition.
Although they have failed to take any major provincial cities, the insurgents have several times seized district centers, even if they have often been driven off soon after by government reinforcements.
With the approach of milder spring weather, security officials have said they expect fighting to surge as the Taliban, fighting to drive out international forces and re-impose their version of strict Islamic law, step up pressure.
The U.S. military's latest estimates from December show the Afghan government controls or has influence over 56 percent of districts, with insurgents controlling or contesting the rest.