Afghan officials say they have regained control of key areas of the northern city of Kunduz from the Taliban.
An operation launched overnight saw forces recapture government landmarks and inflict heavy casualties on the militants, officials said.
There has been no word from the Taliban, but fighting is reported to be ongoing.
The city's capture was a huge blow to President Ashraf Ghani, coming on the first anniversary of his taking power.
Kunduz police chief spokesman Sayed Sarwar Hussaini told BBC Afghan on Thursday that the military had retaken the governor's office, the police chief's office and the intelligence agency building, adding: "Taliban bodies are lying around."
Pictures on social media purported to show government forces inside the city, which Afghan interior ministry spokesman Sediq Sediqqi tweeted was being cleared of insurgents.
Residents in Kunduz are said to be nervous after a night of bombardment, and after militants set up checkpoints and placed mines on roads to prevent people leaving and troops entering.
Reports also said local boys and men were being forced to fight with the Taliban, who had seized police equipment, ammunition and vehicles and raided banks.
The US Army confirmed that American and NATO military advisers, including special forces, were in the area, but denied they were fighting on the ground. "But these are dangerous situations and if they need to defend themselves, they will," said a spokesman.
The situation at a strategic Kunduz hill fort captured by the Taliban on Wednesday remains unclear.
Militants had blockaded the Bala Hisar fortress for two days before nearly 200 Afghan security personnel abandoned the position after running out of food and ammunition, according to security officials.
In recent days there have also been reports of fighting in neighbouring Baghlan province, where a former NATO base was said to be under attack.
There were also reports of fighting in several districts in Takhar province, to the east of Kunduz. The Taliban also claimed to have taken a district in western Farah province.
The BBC's Dawood Azami says the Taliban is trying to open multiple fronts to divert the attention of the Afghan military from Kunduz and stretch them thin.
The city's capture has also increased the standing of new Taliban leader, Mullah Mansour, whose succession had been questioned by some in the movement.
Kunduz, with a population of around 300,000, is one of Afghanistan's largest cities, and is strategically important as a transport hub for the north of the country. It is also a bread-basket for the region and possesses significant mineral resources.
Militant violence has increased across Afghanistan since Nato ended its combat mission in Afghanistan in December, leaving a 13,000-strong residual force used for training and counter-terrorism operations.
Nearly 10,000 of those troops are American and the crisis has heightened worries over Washington's plans to pull more of them out. Military leaders are understood to want to keep at least a few thousand in the country after 2016.
Kunduz province has seen a number of attacks since April, with the Taliban joining forces with other insurgents.
The assault on Monday night was swift and took Afghan forces by surprise.
Heavily armed fighters crossed fields to attack the city from multiple directions, helped by infiltrators that had entered the town during the recent Eid festival.
They quickly overwhelmed several of the police checkpoints defending the perimeter of the town before moving into the centre.