Afghan commandos and the US air force have driven the Taliban to the outskirts of Farah, officials said on Wednesday, after a day-long battle to prevent the insurgents from seizing control of the western provincial capital.
The US carried out more drone strikes overnight and the Afghan army is still clearing the city, Afghan and Nato officials said. Shops, offices and schools remain closed, with residents frightened to leave home after hours of heavy fighting. A Nato spokesman warned there could be more fighting on Wednesday.
"The Taliban have retreated from the city and positioned their forces in the outskirts," provincial council member Dadullah Qani said from Farah on Wednesday.
Fighting continued late into the night, he said. "The city is still closed as people are in fear."
With internet and mobile networks patchy, casualty figures were difficult to verify. On Tuesday, the defence ministry said four soldiers and "dozens" of insurgents had been killed.
Reinforcements including special forces were rushed in from Herat and Kandahar as the fighting began late Monday.
Aref Rezaee, a spokesman for the Afghan army's 207th Corps, said that with their help the Taliban were forced from the city at around midnight, some 24 hours after residents said the initial assault began.
"We have started a clearing operation. [Nato's] RS [Resolute Support mission] forces are also deployed in Farah airport. They were involved in providing air support," he said.
A Resolute Support spokesman said the fighting had been "subdued" overnight but was likely to pick up again on Wednesday.
"We conducted a number of additional drone strikes throughout the night and continue to enable the [Afghan military], who remain squarely in the lead," Lt Col Martin O'Donnell said.
"The 207th Corps commander is leading operations on the ground and the city remains in government control."
There had been reports that the militants were hiding in homes, meaning that the clearing operation was likely to be slow.
People remained fearful. "I want to open my shop today but they have planted landmines in some parts of the city," Abdul Samad said.
Afghan forces, their numbers sapped by killings and desertions, have been struggling to hold back the resurgent militant group since the withdrawal of Nato combat forces at the end of 2014.
The assault on Farah is the latest in a series of attempts by the Taliban to capture urban centres. Kunduz, Afghanistan's fifth largest city, fell briefly to the insurgents in 2015.
Farah province, a remote poppy-growing region that borders Iran, has been the scene of intense fighting in recent years, and there have long been fears that the city of Farah is vulnerable.
The Taliban, along with ISIS, have also stepped up their attacks in the capital Kabul, which the UN says has in recent years become one of the country's deadliest places for civilians.