There was no immediate comment from the Taliban, which only a day earlier had claimed their militants were advancing on the airport on the outskirts of the city, where many Afghan troops were based.
Afghan special forces seized control of the city in an operation that began late Wednesday and were still clearing out Taliban fighters from some areas early Thursday, said Sayed Sarwar Hussaini, a spokesman for the Kunduz police chief.
The U.S. military helped the Afghan forces during the operation through advisers on the ground and by conducting airstrikes, Hussaini said.
Sediq Sediqqi, an Afghan Interior Ministry spokesman, said on Twitter that Taliban insurgents suffered heavy casualties in the fighting.
Other Afghan government officials issued statements congratulating the security forces.
Civilians caught up in fighting
The government lost control of Kunduz on Monday, an embarrassing setback and the first time the Taliban
have taken over a provincial capital since 2001.
Militants had been building up forces around the city for months, giving the government plenty of warning.
Afghan security forces had initially faltered in their attempts to wrest it back, with Hussaini saying Wednesday that the Taliban had blocked reinforcements in the neighboring province of Baghlan.
As the fighting raged, civilians were stuck in the middle.
Doctors Without Borders said its trauma hospital in the city has been overwhelmed with patients. The aid organization reported that its doctors treated at least 252 wounded people, including 53 children, since Monday.
"The majority of patients had sustained gunshot wounds, and surgeons have been treating severe abdominal, limb and head injuries," Doctors Without Borders said in a statement. Anticipating more casualties, the organization is rushing medical supplies by road and air to the embattled city.
'A ghost city'
As many as 6,000 civilians are reported to have fled the city because of the violence, the United Nations said Wednesday.
"I am deeply concerned about the situation in Kunduz following the Taliban's attack on the city," said Nicholas Haysom, the U.N. special representative for Afghanistan. "The reports of extrajudicial executions, including of health care workers, abductions, denial of medical care and restrictions on movement out of the city are particularly disturbing."
Civilians reported frightening scenes.
"We don't know what to do and where to go," a male resident of Kunduz told CNN by phone before Afghan authorities announced the city was under their control. He spoke on condition of anonymity, fearing retribution.
He said shrapnel had struck his hand after he was accidentally caught in a firefight between government and Taliban forces.
"I was near the main roundabout of Kunduz when the fight between government forces and the Taliban became intense and the Taliban fighters were firing back meters away from me," the man said.
"I was running to get to a safe place when shrapnel hit my hand I was wounded."
The man said shops are closed, there is a citywide power blackout, and it is becoming difficult to find food.
"Kunduz has turned into a ghost city," he said.
U.S. forces in the area
The U.S.-led coalition ended its combat mission in Afghanistan last year, handing over the lead to Afghan forces while remaining in a training and assistance role.
"Obviously, this is a setback for the Afghan security forces," Pentagon spokesman Peter Cook said Tuesday of the loss of Kunduz. "But we've seen them respond in recent weeks and months to the challenges they face, and they're doing the same thing in Kunduz right now."
In addition to a series of U.S. airstrikes in the area, the NATO-led international mission in Afghanistan said there were "limited coalition forces around Kunduz advising and assisting" Afghan security forces.
"We've seen U.S. aircraft supporting the Afghan government and the Afghan security forces because they can't do it alone just yet," said Mark Hertling, a retired U.S. Army general. "You're also going to see U.S. special forces -- special operating forces -- supporting the commandos in Afghanistan as they attempt to reinforce Kunduz."
U.S. and German forces regularly operate in the area, advising Afghan forces.