The day after Taliban fighters swept through Afghanistan's northern city of Kunduz, capturing a major urban area for the first time since 2001, six stray bullets crashed through the windows at the Doctors Without Borders hospital there.

The spillover from the militant assault, which had overwhelmed local security forces, was an unsettling sign at the lightly guarded civilian facility, where doctors and nurses were tending to a crush of patients.

It was also a foreshadowing of a far greater calamity that would descend on the hospital four days later when, in the early hours of Oct. 3, nearby U.S. combat advisers authorized a gunship to unleash a powerful attack. The AC-130U plane, circling above in the dark, raked the medical compound with bursts of cannon fire, including high explosive incendiary munitions, for more than an hour. The assault left at least 22 people dead, some of them burned to death.

The aid group, also known as Médecins Sans Frontières, or MSF, has demanded an international investigation of what it deems a possible war crime.

The U.S. military, whose own account of what took place changed in the initial days after the attack, has said that the hospital was "mistakenly struck" in an attempt to support Afghan security forces. But the military has declined to provide full details of the incident while its investigators examine what occurred in the worst example of errant U.S. air power in recent years.

This account of what took place is based on multiple interviews in Afghanistan and the United States with U.S. and Afghan military officials, MSF personnel and local Kunduz residents; some of those interviewed spoke on the condition of anonymity because of the ongoing investigation.

Although government forces have recaptured much of Kunduz, the city's collapse to a relatively small militant force was a blow to the Afghan government and its Western allies, illustrating the Taliban's potency at a time when foreign forces are winding down their long mission in the country.

In the days after the city's Sept. 28 collapse, Taliban fighters consolidated their control of the neighborhood around the hospital's tree-lined compound, clamping down on residents' movement and imposing their harsh interpretation of Islam.

For much of that week, the central Kunduz neighborhood of Spinzar, which was under the militants' control, was relatively quiet, according to residents and hospital officials.

Inside the hospital, which the international relief agency in recent years had turned into the province's most advanced medical facility, doctors and nurses were busier than ever. Between Sept. 28 and Oct. 3, exhausted hospital staffers treated 394 people, many of whom had received gunshot wounds during the battle for the city.

All that week, a steady stream of Taliban fighters appeared at the hospital seeking treatment, adding to the patient load, according to a hospital security guard.

Before fighters were admitted onto hospital grounds, the guard said, they were required to hand over their assault weapons to facility guards. Once inside, the Taliban - many of whom had been shot - were treated like any other patient.

The Taliban appeared to respect the neutrality of the MSF operation, the only hospital functioning in Kunduz that week.

"Even the Taliban didn't harm wounded Afghan security forces taken to the hospital," the guard said.

MSF has declined to discuss patient identities, pointing to rules under the Geneva Conventions that state wounded soldiers or militants must be treated like other noncombatants. "We don't even want to know who is inside because that is a basic protection, as a patient," said Guilhem Molinie, director of MSF operations in Afghanistan.

But MSF officials, speaking on the condition of anonymity, said that some Taliban fighters were treated.

According to the guard's account, not just wounded Taliban were present at the hospital that week. On Monday, Sept. 28, as the battle for Kunduz kicked off, Mullah Abdul Salam, the most senior Taliban commander in Kunduz province, visited wounded fighters receiving treatment there, the guard said.

Some Afghan leaders have suggested that the Taliban had been using the hospital as a base. MSF officials have strongly denied those claims, saying no Taliban commanders and fighters had used hospital grounds to plan or carry out attacks.

Shattered calm

Early on Saturday, Oct. 3, a team of U.S. Special Operations forces was tracking the fighting across Kunduz from a small U.S.-Afghan joint operations center at the airport, about five miles south of the city. The JOC, as it is called, has become a hallmark of the long insurgent wars in Iraq and Afghanistan, where U.S. forces liaise closely with their local counterparts.

As part of the limited U.S. military mission in Afghanistan, that night the U.S. forces were supporting elite Afghan troops as they fought their way through the city, and helped coordinate U.S. air power to back their assault against the Taliban.

Gen. John F. Campbell, commander of U.S. and allied forces in Afghanistan, told lawmakers in Washington this week that his forces were providing planning and "training advice" for local forces around Kunduz, with a headquarters support group at the airfield.

In the days after the city's fall, Afghan security forces had advanced into Kunduz's commercial district but were still locked in intense clashes with Taliban militants holed up in government buildings, private homes and the abandoned offices of international aid groups. That Afghan security forces had made it into the city at all was a result of the airstrikes that the U.S. military began to conduct to support their advance.

The strikes earlier in the week were reported to have killed nearly 50 Taliban fighters who were attempting to advance on Afghan and coalition troops at the Kunduz airport.

In central Kunduz on the night of Oct. 2, hospital staffers were settling in. Five patients - members of a single family shot while trying to flee Kunduz - had been brought in earlier that evening, around 6 p.m. The wards were mostly quiet after that, and no major fighting had been reported.

"It was the first time the team could rest and [the] first time we could plan some operations that had been delayed before," Molinie said.

Shortly before midnight, clashes erupted nearby between Taliban and government forces and quickly intensified, said Islamuddin, a Kunduz resident who lives about 50 yards from the hospital gates and, like many Afghans, goes by one name. At the airport, U.S. advisers received a request from Afghan special forces for urgent help in the vicinity of the hospital, where they reported receiving Taliban fire.

Scrambling to assist, American Special Operations forces advisers requested immediate close air support for the Afghan commandos.

Soon after, an AC-130U from the 4th Special Operations Squadron - call sign "Hammer" - was lumbering through a mostly clear night sky toward the target position.

The AC-130U is one variant of the AC-130 gunship. A holdover from the Vietnam War, the plane is a converted transport aircraft loaded with 25mm and 40mm cannons as well as a 105mm howitzer. As its weapons jut from the left side the aircraft, the AC-130 engages targets in a wide left turn. Crewed by a dozen airmen, including a special operations ground liaison officer responsible for coordinating with ground forces, the AC-130 has low-light and thermal sensors that give it a "God's eye" of the battlefield in almost all weather conditions.

According to individuals familiar with the incident, American forces from the JOC directed the aircraft over the Afghan special forces and sent up the initial "call for fire" to the aircraft. The request gave the aircraft the necessary targeting information as well as the location of friendly forces.

According to an individual familiar with the aircraft's operations that night, the sensor operators identified fighters moving into and firing from one of the hospital's front porticos. The crew, piloting an aircraft that rarely targets buildings, asked the JOC twice if they wanted the aircraft to engage, the individual said. How close active Taliban forces may have been to the hospital - a point where the accounts of MSF personnel and Afghan security officials diverge - is now a central question for investigators. Even if the Taliban were firing from the compound, U.S. rules of engagement would not have allowed an airstrike if the crew knew it was a protected civilian facility.

On Saturday, Pentagon press secretary Peter Cook said that the U.S. military was authorized to make "appropriate" condolence payments to the families of civilians killed in the hospital attack, and to provide funding for repairing the hospital.

U.S. investigators are now trying to determine whether the air crew knew that the target was a hospital.


doctors without borders
This handout photograph released by MSF on Oct 7, 2015, shows medical personnel as they treat wounded colleagues and patients in a hospital in Kunduz on Oct 3, 2015, in the aftermath of an airstrike on the facility in the northern Afghan city. - AFP Photo/MSF


While Afghan military officials have not said definitively whether they think that the Taliban were firing from near or within the compound, a local police commander said that the group had set up a "command center" at the facility - an assertion MSF has strongly rejected.

Who placed the call?

Another unresolved question is who placed the request for the air support. According to Brig. Gen. Dawlat Waziri, a spokesman for the Afghan Ministry of Defense, troops from the Afghan army's 209th Corps were fighting on the ground in that area, but officials in Kabul were unsure whether they made the request processed by U.S. advisers at the Kunduz airport.

Waziri suspects that Afghan soldiers were aware of the hospital's location. Before soldiers begin combat, they receive detailed maps from local police outlining the locations of mosques, schools and hospitals, he said.

A few minutes after 2 a.m., following approval from U.S. forces, the plane fired a massive initial burst at the main hospital building, which houses the facility's emergency rooms and intensive care unit.

While it is unclear what weapons were employed, the AC-130U's 40mm round has a high explosive incendiary munition that is lined with zirconium. The rounds are known for causing fires.

One MSF physician, who spoke on the condition of anonymity for security reasons, had finished his shift and was drifting off to sleep in the hospital's break room when a giant blast shook the building. Light fixtures and parts of the ceiling crashed down on him.

The explosion, possibly from the plane's 105mm gun, was so powerful that it shattered windows of nearby homes. "I saw the flame of fire rise from the hospital," Islamuddin said.

The physician and other staffers rushed to the hospital's basement, which was used as a makeshift bomb shelter.

Far above, the U.S. pilots banked the aircraft into a wide orbit circling the hospital. Over the next 65 minutes, the plane unleashed additional fire on each pass around the facility below, every 15 minutes or so.

Some staff members and patients may have died instantly; others died amid the rubble or as colleagues tried fruitlessly to administer care. A pharmacist died in the hospital office. As a fire engulfed the hospital building, at least six patients burned to death in the intensive care unit.

During the attack, MSF staff members placed desperate calls to colleagues, who relayed messages to U.S. officials in Kabul and Washington, including to the Pentagon's Joint Staff in Washington, the organization said.

In the days before the assault, MSF said, it provided the hospital's location repeatedly to the same officials. But the relief group has declined to provide details of exactly who it alerted. The office of the Joint Staff says it has not yet located an individual who received that information.

At about 3:30 a.m., staffers huddled in the basement bomb shelter heard the guns fall silent. It is not known why the air crew chose to halt the attack at that time.

Many of those who had taken shelter below ground were too frightened to emerge and stayed there until dawn. "Then we heard this calling, 'Anyone alive? You can come out,' " the physician recalled.

When he emerged into the rubble of the smoldering hospital, the doctor immediately saw the bodies of slain patients and colleagues. Other staffers began to make their way out into the open and rushed to treat those wounded in the attacks. Some could not be saved. One doctor died on a desk while other staffer tried to perform emergency surgery to save him.