A promised counterattack by Afghan forces aimed at retaking the strategic city of Kunduz from Taliban militants collapsed early Wednesday as hundreds of soldiers and civilians reportedly fled to the city's airport, where they were surrounded by insurgent forces. 

The New York Times reported that the assault on Kunduz, a city of 300,000 in northern Afghanistan, may have been just the first part of a broader offensive by the Taliban. The paper reported that several military checkpoints and government buildings in Takhar Province, east of Kunduz, had also come under attack by militants. 

The Associated Press reported that Taliban fighters began fanning out across Kunduz itself Tuesday, closing roads, throwing up checkpoints and torching government buildings as fearful residents huddled indoors. Afghan forces attempting to retake the city were stalled by roadblocks and ambushes, unable to move closer than about a mile toward their target.

Meanwhile, U.S. warplanes carried out two airstrikes on Taliban positions, and a NATO officer told the AP that more airstrikes were unlikely as "all the Taliban are inside the city and so are all the people." He spoke on condition of anonymity because he was not authorized to brief media on the issue.

His words suggested the fight to retake the city would involve painstaking street-by-street fighting as government forces try to avoid civilian casualties in retaking control. Reuters reported that Afghan forces had expressed a reluctance to use attack helicopters and heavy artillery in urban areas. 

More On This...

The insurgents used mosque loudspeakers to try to reassure people they were safe. But residents, recalling the group's brutality during its 1996-2001 rule of Afghanistan, were fearful of what was to come.

"Kunduz is a ghost city now, fear has locked people inside their homes," said Folad Hamdad, a local freelance journalist who escaped late Monday to neighboring Takhar province.

He said Taliban gunmen were going door to door "searching for government officials, local police commanders, anyone they can think of. No one is safe."

The fall of Kunduz, the first urban area taken by the Taliban since the U.S.-led invasion ousted their regime 14 years ago, is a major setback to President Ashraf Ghani, who has staked his presidency on bringing peace to Afghanistan and seeking to draw the Taliban to peace talks.

In a televised address, he vowed to take Kunduz back from the insurgents, urging the nation to trust Afghan troops to do the job.

"The enemy has sustained heavy casualties," he said. "The enemy's main objective was to create fear and terror."

Acting Defense Minister Masoom Stanekzai said Taliban fighters had infiltrated the city during the recent Eid holiday, the biggest of the year when millions of Afghans move around the country to spend time with family.

The insurgents were reinforced by militants who came from neighboring Pakistan after being driven out by a military offensive, as well as from China and Central Asia, Stanekzai said.

Monday's fierce multipronged assault took the Afghan military and intelligence agencies off guard after what had appeared to be a stalemate throughout the summer between Taliban forces besieging the city and government troops defending it.

"None of the security forces or officials had any information about the attack; if they had they would have warned the NGOs, the U.N. and the banks, but they didn't," said one Kunduz resident, a banker who escaped the city late Monday and spoke to The Associated Press in Kabul.

"Yesterday it was possible for people to get out of the city, but today it is too late because all roads are under the Taliban control," said the man, who spoke on condition of anonymity out of fear for his safety.

He said that amid the confusion of the attack, government officials and their bodyguards fled to the airport in an attempt to flee. Kunduz Gov. Omer Safi was out of the country for the Eid holiday, and his current whereabouts were unknown.

Kunduz and the surrounding province, also called Kunduz, have a total population of around 1 million. The region is one of the country's chief bread baskets and has rich mining assets. It lies on a strategic crossroads connecting Afghanistan to Pakistan, China and Central Asia.

The insurgents have had a heavy presence in the province since launching their annual summer offensive with an assault on the city in April. Officials say the Taliban have allied with other insurgent groups to boost numbers and fire power. The region's natural resources, as well as proximity to smuggling routes into Central Asia for drugs, minerals and weapons make it an attractive prize for the insurgents.

Afghan security forces have been sorely tested by the fighting, following the withdrawal late last year of international combat troops. Army and police have suffered huge casualties and their resources have been spread thinly across the country as the Taliban have taken their fight to topple the Kabul government to every corner of Afghanistan.

The United Nations evacuated international staff from Kunduz about five hours after the attack began at 3 a.m. Monday. Other non-government organizations, including Doctors Without Borders and the International Red Cross, also evacuated some international staff, and photographs from the city showed gunmen riding around in U.N. and ICRC vehicles.

The number of dead and wounded in the fighting was unclear as overwhelmed health workers struggled to treat the injured and verify how many had died.

"We fear that many more civilians may be harmed if fighting continues over the next few days," U.N. High Commissioner for Human Rights Zeid Ra'ad Al Hussein said, adding that the U.N. was "seeking to verify reports that at least 110 civilians were killed and injured."

He urged all parties to the conflict to take "all measures to protect civilians from harm."

Public Health Ministry spokesman Wahidullah Mayar said on his Twitter account that Kunduz hospitals had received "172 wounded patients and 16 dead bodies so far."

Doctors Without Borders said its "overwhelmed" trauma center in Kunduz treated 171 wounded since early Monday morning, including 46 children. Earlier, Kate Stegeman, the aid group's communications director, said nine patients had died.

Security analyst Ali Mohammad Ali described the Taliban takeover of the city as "a shock but not a surprise, because every province in Afghanistan is as fragile as Kunduz."

With the capture of Kunduz, the Taliban have achieved a "huge political and propaganda victory," he said.

The Associated Press contributed to this report.