At least 20 Afghan security forces were killed in simultaneous raids on a provincial capital and district in northern Afghanistan on Tuesday.
Hundreds of militants were outside Sar-e-Pul city, which provincial governor spokesman Zabihullah Amani said was at risk of falling to the Taliban if reinforcements were not sent.
The Taliban have stepped up attacks on security forces across the country, slaughtering police and soldiers in record numbers, as the threat of a US drawdown complicates American-led efforts to end the 17-year conflict.
Amani said: “The enemy is still amassing forces outside the city.
“We have deployed all the forces available in the city, but no reinforcements have arrived from outside so far.
“The people inside the city are very worried.”
Taliban fighters launched the attacks on Sar-e-Pul and neighboring Sayad district on Monday night, which Amani said were aimed at seizing control of several oil wells on the outskirts of the city.
At least 21 local forces, including police and intelligence, were killed and another 23 wounded in the attacks, Amani said.
“They have attacked the city many times in the past, but this time the threat is more serious,” he said.
A security official, who spoke to AFP on the condition of anonymity, put the death toll slightly lower at between 15 and 20 members of local forces.
Kabul-based interior ministry deputy spokesman Nasrat Rahimi confirmed there had been casualties, but would not provide details.
He said reinforcements had been deployed to Sar-e-Pul and dismissed concerns that the provincial capital was at risk of falling to the insurgents.
The Taliban confirmed the attacks, saying their fighters had captured three checkpoints and killed or wounded 50 members of the security forces.
In recent days, Taliban representatives have met with Iran, as Tehran makes a more concerted and open push for peace ahead of a possible US drawdown.
The Taliban delegation discussed with Iran “the post-occupation situation, restoration of peace and security in Afghanistan and the region”, the militants said in a statement posted on social media and emailed to journalists on Tuesday.
It signals growing confidence among the Taliban that US troops will pull out of Afghanistan, after US officials last month told various media outlets that President Donald Trump had decided to slash the number of boots on the ground.