US and Afghan aircraft Tuesday bombed Taliban positions in the western city of Farah after the insurgents launched a major attempt to capture the provincial capital, with fearful residents seeking shelter from explosions and gunfire.
Special forces from Kandahar and Herat were rushed to the city to take part in the fighting, which residents said began around midnight, and was still ongoing as darkness began to fall Tuesday.
It was the latest in a series of attempts by the Taliban in the past three years to capture urban centres. Afghan forces have been struggling to hold back the resurgent militant group since the withdrawal of NATO combat forces at the end of 2014.
Afghan forces and NATO's Resolute Support mission said that the government remained in control, but the Taliban also appeared confident, posting a flurry of social media updates throughout the day that purported to show their fighters in the city.
Farah province, which borders Iran, has been the scene of intense fighting in recent years, and there have long been fears that the city is vulnerable.
"The situation is very bad," Satar Hussaini, a tribal elder in Farah, told AFP earlier.
"Heavy fighting is going on and Taliban are in the city but the police headquarters and NDS (the Afghan intelligence agency) have not fallen to them," he said.
"NDS forces in their HQ are engaged in heavy clashes with the Taliban."
Another provincial council member, Dadullah Qani, confirmed Hussaini's comments. Gunfire and explosions could be heard as he spoke to an AFP reporter by telephone.
The noise has "filled the city", said one resident who gave his name as Bilal, adding that he could see smoke rising from the direction of a building housing the NDS.
NATO's Resolute Support mission in Kabul tweeted that the Afghan army, supported by US airpower including A-10 Thunderbolts, was "on the offensive" and the city "remains under govt. control".
Defence ministry spokesman Mohammad Radmanish said US forces launched airstrikes, but added the majority have been carried out by the Afghan air force.
"Pockets of the enemy resistance still remain... but our forces are battling the enemy with high morale," he told AFP.
With internet and mobile networks patchy, casualty figures were difficult to verify. Radmanish said four soldiers and "dozens" of insurgents had been killed.
At least some militants have been hiding in private houses, making it difficult for Afghan forces to use heavy weapons, Farah governor Abdul Basir Salangi told Ariana News, adding: "But still we are taking back positions one by one."
Many radio and television channels in the province have stopped broadcasting, fearing for their employees' lives, according to media watchdog Nai.
The insurgents in a statement warned residents to remain in their homes and "stay calm".
The Taliban are stepping up their spring offensive, in an apparent rejection of a peace talks overture from the government.
Farah is a poppy-growing province in an isolated region of Afghanistan.
There are plans for a section of the multi-billion-dollar TAPI (Turkmenistan, Afghanistan, Pakistan and India) gas pipeline to traverse it, a project with which the Taliban have pledged to cooperate.
But it has been the scene of intense fighting in recent years. In 2017, insurgents tried three times to overrun the capital, according to the Afghanistan Analysts Network.
As such, Tuesday's offensive "should not have taken government forces off guard", said military analyst and retired general Atiqullah Amarkhail.
Amarkhail added that "even ordinary citizens were aware of the Taliban gradually taking over more areas and becoming a formidable force in the province".
He accused the government and military leadership of "turning a blind eye" until the insurgents actually entered the city.
Afghan troops and police nationwide have struggled to cope with unrelenting militant attacks in recent years.
According to US watchdog SIGAR, the strength of the Afghan security forces dropped by about 10 percent over the course of a year -- falling to a total size of 296,409 personnel in the army and police forces as of January 31.
When asked about the issue, US Defense Secretary Jim Mattis said that Afghan forces are actually being bolstered in the most important area -- special operations forces.
Speaking earlier this month, he said this expansion was why the Taliban had not taken any district centres or provincial centres.
The insurgents have tried several times to take provincial capitals in recent years, including Kunduz and Lashkar Gah, with the Afghan army deploying significant numbers of troops to hold those cities and push the militants out.
Kunduz, Afghanistan's fifth largest city and capital of the northern province of the same name, fell briefly to the Taliban in 2015.
They along with the Islamic State group 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.