Afghan officials said government troops recaptured much of the strategic northern city of Kunduz from Taliban insurgents early on Thursday, three days after losing the provincial capital in an embarrassing defeat for Kabul and its U.S. allies.
Details of the overnight counter-offensive were still emerging, and it was not immediately clear which areas of the city of 300,000 were back under government control.
A Taliban spokesman denied the government had retaken Kunduz, saying insurgent fighters were still resisting government forces in the center and controlled most of the rest of the city.
Afghan forces, backed by U.S. air strikes, have been struggling for two days to retake the city after it became the first provincial capital to fall to the Taliban since 2001.
"Afghan security forces got control of Kunduz city from Taliban overnight after heavy fighting," Hamdullah Danishi, acting governor of Kunduz province, told Reuters by telephone.
"After we got reinforcements and started a massive operation inside Kunduz city, the Taliban could not resist and escaped. We will give a full report soon," he added.
Dawlat Waziri, a spokesman for the Ministry of Defense, said the counter-offensive started at 11 p.m. on Wednesday and finished at 4 a.m. Thursday.
"Right now, the Taliban have left Kunduz city. A clearance operation is ongoing," Waziri said.
However, Taliban spokesman Zabihullah Mujahid, said the fighting was continuing.
"Enemy claims regarding the Kunduz situation are not true. Mujahedeen (Taliban fighters) are resisting in the city’s security circle," Mujahid said, adding the Taliban still controlled most of the city and surrounding districts.
"American forces are also involved in this fight but we are still defending."
It could not immediately be confirmed what role foreign forces played in the overnight offensive, but, according to a coalition spokesman, an undisclosed number of U.S. and allied troops were sent to Kunduz earlier in the week to "advise and assist" Afghan allies.
On Wednesday, a group of coalition special forces, including U.S. troops, engaged the Taliban in a ground clash, said the spokesman, Col. Brian Tribus.
At least five U.S. air strikes have targeted Taliban positions near the city since the fighting broke out on Monday.
There were no immediate details about civilian casualties during the new offensive.
The Taliban, who ruled Afghanistan with a harsh interpretation of Islamic sharia law for five years, have been fighting to re-establish their Islamist rule after being toppled from power by a U.S.-led intervention in 2001.
On Monday, the insurgents' pre-dawn assault on Kunduz from four directions caught Afghan police and army by surprise, handing the Taliban a public relations coup and arguably their largest victory in nearly 14 years of war.
Almost the entire city had fallen into Taliban hands by nightfall, with government officials and forces retreating to the airport outside the city.
The city's capture by the Taliban was a blow to the narrative that the NATO-trained Afghan police and army were steadily improving and able to prevent the Taliban from taking over and holding significant territory.
Training the 350,000 strong Afghan National Security Forces has been the heart of the U.S. plan to end involvement in its longest war. American and allied forces official ended their combat role at the end of last year, leaving behind a training and advising force of several thousand.
While the government's recapture of Kunduz had been expected, the police and army struggled for two days even as Afghan President Ashraf Ghani tried to assure citizens that the situation was under control.
The Taliban mined roads to Kunduz to block reinforcements arriving and launched an assault on the airport where some 5,000 government officials and troops were based.
Late on Wednesday, Afghan reinforcements broke through the Taliban defenses and reached the airport to prepare the ground for Thursday's counter-offensive.
Afghan Deputy interior Ministry Mohammad Ayub Salangi praised the recapture on his Facebook page.
"I want to congratulate the terrorist defeat in Kunduz to the great nation of Afghanistan and our international allies."