The Taliban’s takeover of the northern Afghan city of Kunduz gives the insurgency control over a crucial corridor, and potential to further its reach.  KABUL, Afghanistan — The Taliban announced that they had withdrawn completely from the northern city of Kunduz on Tuesday, ending their first takeover of any Afghan city during the last 14 years of war.  The insurgents held Kunduz for just 15 days, but during that time they destroyed government offices and facilities, seized military hardware, hunted down opponents, and freed prisoners from the city’s two prisons.  In the process, the Taliban also delivered a shock to hopes that the Afghan security forces could dependably defend the country’s most important population centers. In the attack, several hundred Taliban overwhelmed an estimated 7,000 government defenders.  Panic sent residents of several other northern provincial capitals fleeing from their homes over the past two weeks, and that pattern continued on Monday — even as the Taliban withdrew from Kunduz in order to avoid, as a statement from the insurgents put it, “unnecessary waste of ammunition.”  The group also boasted that it might later retake the city, as it had proved that it was capable of engaging in urban warfare successfully.  Kunduz government officials and some residents began returning on Tuesday to assess the damage, although witnesses said few residents had moved back into their homes. As recently as Monday, those officials were leaving the city at night to take refuge in the military base at the Kunduz airport, the one place in the city that never fell to the insurgents.  Although Afghan forces found themselves back in control in Kunduz on Tuesday, it was only after days of assistance from American airstrikes and Special Operations ground forces who were in the center of the fighting, according to Afghan government and military officials.  Those forces are in Afghanistan as part of the 17,000-member NATO contingent in the country, including 9,800 Americans. But they are supposed to be concentrating on training and counterterrorism operations against extremists like Al Qaeda. Instead, they have repeatedly been called into action to get government forces out of trouble.  Within days of Kunduz’s fall, the government repeatedly claimed that it had retaken the city — claims that many Afghans scoffed at, since they could readily track the progress of the fighting on social media. Control of Kunduz seesawed in street-to-street fighting in downtown neighborhoods, and in recent days, the Taliban did appear to have been mostly pushed out of the city, at least during the day.  On Monday night, according to Afghan officials, the insurgents made several attempts to destroy strategic bridges on the outskirts of the city, the Chardara Bridge and the Alchin Bridge, which would have isolated Kunduz, Afghanistan’s fifth-largest city, from surrounding districts and highways to other parts of the country. The officials said Afghan forces had managed to save the bridges from destruction.  The insurgents also attacked a crucial point in the city, the Pamir Hotel, four times on Monday night, but were pushed back, Afghan officials said.  Then on Tuesday, the Taliban posted a statement on a website associated with the group, saying they were ordering their fighters to withdraw from the city to preserve the lives of their fighters, as well as to protect civilians.  “The Islamic Emirate considered it in its best military interest to fortify its trenches surrounding the city rather than keeping the city, which would result in casualties to the mujahedeen and unnecessary waste of ammunition,” the statement said.  The Kunduz assault was the first concerted attempt by the Taliban to hold an Afghan city since 2001, and the insurgents proved unexpectedly adept at conducting urban warfare. Their well-organized takeover of the city, using fighters who infiltrated into scores of homes ahead of the fight and others who disguised themselves in government uniforms, took both Afghan security forces and the American-led international coalition by surprise.  Previous Taliban attacks on major population centers had been limited to suicide attacks by individuals or small numbers of attackers. But in Kunduz, the Taliban appeared well trained and organized, making effective use of weapons like high-tech sniper rifles and armored vehicles they had captured.  Their success in Kunduz also caused alarm in many other parts of Afghanistan, with people fleeing from Pul-i-Kumri, in Baghlan Province 60 miles to the south, and Faisabad, in Badakhshan Province 150 miles to the east, even though those provincial capitals were not attacked.  At the same time, the insurgents have been mounting determined attacks in places as far-flung as Maimana, in Faryab Province of northwestern Afghanistan, and Helmand and Oruzgan Provinces in southern Afghanistan. The United Nations recently closed four of its 13 provincial offices because of security concerns, more than at any time since 2001, evacuating staff and family members to safer cities.  All across Afghanistan, nearly half of the country’s districts are now rated by the United Nations as “high risk” or “extreme risk,” the most at any point of the conflict since 2001.  Final casualty figures from the fighting in Kunduz were 57 killed and 630 wounded, including civilians and members of the military, according to Saad Mukhtar, director of public health in Kunduz.  Nearly half of those fatalities were caused by an American airstrike on the Doctors Without Borders hospital in Kunduz that killed at least 22 staff members and patients, despite the fact that the aid group had sent the hospital’s coordinates to the United States military.  The group has called for an independent investigation of how the strike happened, noting that initial details announced by American officials had proved false.  Other than at the hospital, civilian casualties were relatively low, according to the official Afghan figures. The Kunduz provincial police chief, Qaseem Jangalbagh, said that of the 57 dead, 31 were police officers. Both Taliban and government officials said they were making every effort to avoid civilian casualties.  United Nations assessments were that 13,000 families fled their homes in northeastern Afghanistan, most from the Kunduz area. And with the insurgents still controlling parts or all of the districts surrounding Kunduz city, it seemed likely that many people would be reluctant to return there soon.  “I will never go back,” said Jamshid Rahimi, an aid worker who evacuated his family to Mazar-i-Sharif. “Kunduz is not a place to live. Everything is broken down — the government, the schools, everything.”  In an unrelated but worrisome development, the fourth Afghan or international military aircraft in three days was reported to have crashed on Tuesday. The Afghan Army announced that a “coalition jet” had crashed in the Kohteen area of Paktia Province.  A spokeswoman for the American-led NATO coalition, Susan Harrington, said she had no information on such a crash.  On Monday, Afghan officials confirmed that a small transport plane and a helicopter, both part of the Afghan Air Force, had crashed in accidents that did not involve enemy fire. The small air force has struggled to replace and maintain its existing aircraft.  On Sunday, a NATO helicopter landing at the coalition headquarters in central Kabul clipped the tether cable of a surveillance blimp, killing five people — two American soldiers, two British soldiers and a French military contractor.  The unmanned blimp crashed on a home elsewhere in the city, reportedly without further casualties.  Because of Taliban threats on roads and highways, including in Kabul itself, aircraft are being used with increasing frequency to transport personnel even on routine activities.  Reporting was contributed by Najim Rahim from Kunduz, Afghanistan; Farooq Jan Mangal from Khost, Afghanistan; and Mujib Mashal and Alissa J. Rubin from Kabul.  A version of this article appears in print on October 14, 2015, on page A6 of the New York edition with the headline: Taliban End Takeover of City After 15 Days. Order Reprints| Today's Paper|Subscribe
The insurgents held the city for 15 days, destroying government offices, hunting down opponents and allowing prisoners to escape the city’s prisons.