Afghan security forces have recaptured a district headquarters in western Farah province that had been seized by the Taleban, local police say.
The Taleban were driven from power by a US-led assault in 2001
The building in Golestan district, which fell to insurgents after days of fighting, was retaken within hours, police chief Sayed Aqa Saqib said.
It is thought local tribal elders may have helped mediate with the Taleban.
The Farah attack raised fears of a new front opening in the west. Hundreds have been killed in the south and east.
Hundreds of heavily-armed Taleban fighters have been involved in this week's violence in Farah province, the authorities say.
Afghan security forces in Golestan were over-run and support was unable to reach them, police chief Saqib told the BBC earlier on Friday.
The Pakistan-based Afghan Islamic Press quoted the Taleban as saying they took the district headquarters "after a brief clash" on Thursday evening.
"A soldier was killed and two government vehicles were destroyed in the clash," a Taleban spokesman, Qari Mohammad Yousuf, told the news agency.
"The Taleban set ablaze the building housing the district office."
At least one policeman was killed in the raid on the headquarters, police said on Thursday. It is not clear if there were Taleban casualties.
On Wednesday, four more policemen and four militants died in a clash elsewhere in the province, police said. Earlier in the week a roadside bombing wounded four Italian soldiers.
Farah province borders Iran, and Nato and Afghan officials say they are aware it could become a new front in the war with the Taleban as insurgents flee clashes in the south.
"If there is the possibility of some sort of security deterioration in the area, we will get onto it very quickly," Nato spokesman Maj Toby Jackman told the Associated Press news agency.
Just 1,600 Nato-led troops operate in western Afghanistan's deserts and mountains, with most foreign firepower concentrated in southern and eastern provinces.
The latest violence comes after Poland said it would send 1,000 more troops to Afghanistan next February as part of the Nato peacekeeping force there.
ISAF TROOPS IN AFGHANISTAN
Total Isaf troops - 18,500
Contributing nations - 37
Isaf - International Security Assistance Force
*A further 18,000 non-Isaf, US-led troops also in country
Thursday's announcement followed demands by Nato generals for an extra 2,500 troops for the operation in southern Afghanistan, where forces are suffering mounting casualties in the fighting.
But the BBC's Jonathan Marcus says Nato officials in Belgium are making it clear the Polish deployment will not provide the solution commanders had hoped for.
Our correspondent says they urgently need more troops before the onset of winter, when the fighting will slow down.
There are at least 18,500 foreign, mainly Nato soldiers in Afghanistan in addition to about the same number of US troops deployed.
Half of them are in the south where Canadian and British forces are sharing the burden with US aircraft support and special forces on the ground.