As night slipped over the wheat fields and sandy hills, the blasts and gunfire of the last week had fallen silent. The security guard eased into bed with a faint sense of relief.

From his room near the Doctors Without Borders hospital compound in the center of this bustling northern city, the guard did not hear any sign of hostilities between Afghan forces and Taliban insurgents. The charity hospital was humming, with more than 80 Afghan and foreign staff members treating 105 patients, including a few wounded Taliban fighters.

"Everyone inside the compound was working confidently," recalled the guard, who spoke on condition he be identified only by his middle name, Suhrab. "There wasn't any fighting that night at all. The city was all calm."

Shortly after 2 a.m., Suhrab heard a scream overhead — the unmistakable sound of a warplane — followed by an explosion at the main hospital building, whose white-columned portico sat just a few yards away.

Diving under a desk, he counted 20 more blasts and heard the loud, dull crackling that told him the building was on fire.

Somewhere inside the burning compound, Khaled, a nurse, placed a desperate call to his cousin Abdul Rahim.

"I am dying in a flower bed," Khaled said. "Pray for me."

Panicked, Abdul Rahim jumped into a taxi and set off for Kunduz from his home in Char Dara, several miles west across a winding river. In the city, along the road to the hospital, he was stopped at a Taliban checkpoint.

In the distance, Abdul Rahim could see a faint red glow coming from the hospital complex.

"The Americans are bombing the hospital," a Taliban fighter told him. "Don't go."

::

The American military's Oct. 3 bombing of the hospital in Kunduz, the only trauma center of its kind in northeastern Afghanistan, killed 22 people and wounded 37.

The bombings occurred at about 15-minute intervals and lasted about an hour, MSF staff members said. The main building, housing the intensive-care unit and emergency rooms, appeared to be the target of the strikes; surrounding buildings sustained less damage.

Some staffers and patients retreated to safe rooms in the compound. In one of them, nurse Lajos Zoltan Jecs helped treat a colleague who staggered in covered with blood.

"In the safe room, we have a limited supply of basic medical essentials, but there was no morphine to stop his pain," said Jecs, in an account provided by MSF. "We did what we could."

About half an hour after the airstrikes stopped, sometime after 3 a.m., staff members slowly ventured outside and began to absorb what had happened.

Jecs peeked into the ICU and saw "six patients were burning in their beds."

Omer, an Afghan doctor who had been in an adjacent building, saw the main hospital building charred black, with fires burning inside. Patients and nurses had suffered severe burns, he said.

"It was a horrible moment," he said. "I couldn't save my own colleagues."

"One of our doctors died on an improvised operating table — an office desk — while his colleagues tried to save his life," MSF International President Joanne Liu said.

Survivors tried to carry the wounded and dead out of the compound. Among those killed were three children who had been admitted the previous evening, after they and their parents had come under fire in their vehicle as they tried to drive out of the city.

Into the carnage walked Abdul Rahim, who had finally gotten past the Taliban checkpoint and come to find his cousin Khaled. He saw dozens of bodies, their eyes closed and heads wrapped in bandages, lying in two rooms as three doctors tried desperately to help.

"You couldn't tell who was alive and who was dead," Abdul Rahim said.

He found the bloodied Khaled, who had been wounded as he tried to run from the pharmacy to the main building during a pause in the bombings. Shrapnel had lodged in his back.

Hospital staffers were able to stop the bleeding, but he needed further treatment. Abdul Rahim called another relative who had a rickshaw, and the three piled in and drove toward the city's other hospital.

Along the way, Afghan security forces stopped them, asking why they were transporting a wounded man in the middle of the night, and accused Abdul Rahim of being a member of the Taliban. When they finally reached the main hospital, Abdul Rahim was shocked again.

The facility was abandoned, with barely a doctor or nurse in sight.

::

In the days since the attack, one of the single deadliest civilian casualty incidents in 14 years of U.S. combat in Afghanistan, the American military has added to the confusion by changing its account of what happened.

Officials initially said American troops in Kunduz, deployed to help Afghan soldiers retake the city from the Taliban, called in the airstrike because they were under direct fire from insurgents.

Gen. John F. Campbell, the top commander of U.S. and NATO forces in Afghanistan, later revised that account to say that Afghan forces caught in fighting had requested the airstrike, which was approved and carried out by the U.S. military.

Hamdullah Danishi, the acting governor of Kunduz, was quoted as saying that Taliban fighters had been firing rockets from inside the MSF compound.

But if there was firing near the hospital when the U.S. attacked, witnesses and hospital staff members said, they did not hear anything.

"At the time of airstrike there hadn't been any fighting near the hospital at all," said Omer, the doctor. "The night was very calm compared to other nights."

::

The incident came as a deep blow not just to the victims, their families and MSF, but also to the Afghan government, which had overcome a huge tactical embarrassment and nearly regained control of Kunduz.

"We thought the operation was going well. We were very excited here in Kabul about the partnership with our U.S. friends," said a senior security official in the Afghan capital, who requested anonymity because of the sensitivity of the matter. "This was really unfortunate."

MSF has categorically denied that fighters had infiltrated the compound and has demanded that Afghan officials end the "false charges." The group this week called for an inquiry by an independent commission established under the Geneva Convention, the international laws of war.

"We're not an investigative body. That's why we need this," Cone said. "And we need it to be done by an independent party. We are doctors and we treat patients. That's it."

Khaled, the wounded nurse, was eventually taken to an Italian-run charity hospital in Kabul, where he is recovering. He was one of the first staff members to join the hospital in 2011, his cousin said. MSF closed the facility the day after the bombing; it is unclear whether it will reopen.

"He was so devoted to his work," Abdul Rahim said. "I can't remember a single Eid" — the two holiest celebrations on the Muslim calendar — "where he wasn't at the hospital working."

Special correspondent Latifi reported from Kabul and Times staff writer Bengali from Mumbai, India. Special correspondent Matt Hansen in New York and a special correspondent in Kunduz, who cannot be named for security reasons, contributed to this report.