(CNN) A Doctors Without Borders hospital in Afghanistan was struck accidentally after Afghan forces called for air support from the American military, Gen. John Campbell, the commander of U.S. forces in Afghanistan, said Monday.

Saturday's bombardment in Kunduz has sparked international outrage. It killed 12 medical staff members and at least 10 patients, three of them children, Doctors Without Borders said. Another 37 people were wounded, according to the global charity group, which works in conflict zones to help victims of war and other tragedies.

Every person who died at the hospital was Afghan, the group said.

Addressing reporters Monday at the Pentagon, Campbell said initial reports indicated the airstrike was called to protect U.S. forces.

"We have now learned that on October 3, Afghan forces advised that they were taking fire from enemy positions and asked for air support from U.S. forces," he said. "An airstrike was then called to eliminate the Taliban threat, and several innocent civilians were accidentally struck."

Campbell offered his "deepest condolences."

Doctors Without Borders, which also goes by the name Médecins Sans Frontières, has called the bombing a war crime. In a terse statement after the general spoke, the organization demanded a full and transparent independent investigation.

"Today the U.S. government has admitted that it was their airstrike that hit our hospital in Kunduz and killed 22 patients and MSF staff," the statement read. "Their description of the attack keeps changing -- from collateral damage, to a tragic incident, to now attempting to pass responsibility to the Afghanistan government.

"The reality is the U.S. dropped those bombs. The U.S. hit a huge hospital full of wounded patients and MSF staff. The U.S. military remains responsible for the targets it hits, even though it is part of a coalition," it continued. "There can be no justification for this horrible attack. With such constant discrepancies in the U.S. and Afghan accounts of what happened, the need for a full transparent independent investigation is ever more critical."

White House spokesman Josh Earnest defended the U.S. military on Monday, saying that protecting civilians is a priority.

"There is no country in the world and no military in the world that goes to greater lengths and places a higher premium on avoiding civilian casualties than the United States Department of Defense," Earnest said.

Investigations

U.S. President Barack Obama has said the Pentagon is carrying out "a full investigation" and he expects "a full accounting of the facts and circumstances."

Campbell said, "If errors were committed, we will acknowledge them. We will hold those responsible accountable, and we will take steps to ensure mistakes are not repeated.

"We will await the outcome of the investigation to provide any additional updates, and we will share the results of the investigation once it is complete."

Campbell said he was releasing the information after speaking to the investigating officer in Kunduz.

He told reporters that the United States, NATO and Afghanistan were all looking into the bombing.

"If there's other investigations out there that need to go on, we'll make sure we coordinate those as well," he said.

The NATO-led coalition has said it expects the results of a preliminary multinational investigation in the coming days.

The bombing

Doctors Without Borders said its hospital was hit by "a series of aerial bombing raids at approximately 15 minute intervals" between 2:08 and 3:15 a.m. Saturday.

The bombardments continued even after U.S. and Afghan military officials were notified the hospital was under attack, the charity said.

Photos: Doctors Without Borders hospital attacked in Afghanistan Photos: Doctors Without Borders hospital attacked in Afghanistan Flames are visible inside a Doctors Without Borders hospital in Kunduz, Afghanistan, after a U.S. airstrike on Saturday, October 3. At least 30 people died in the attack, the charity said in its internal review of the strike released Thursday, November 5. The commander of U.S. forces in Afghanistan has said the hospital was hit accidentally. Hide Caption 1 of 5 Photos: Doctors Without Borders hospital attacked in Afghanistan Doctors Without Borders said it had emailed the GPS coordinates of its main hospital and administration office building at the Kunduz center before the airstrike. The U.S. commander said airstrikes were called after Afghan troops advised they were "taking fire from enemy positions."

Hide Caption 2 of 5 Photos: Doctors Without Borders hospital attacked in Afghanistan Doctors Without Borders is asking for an indepedent investigation by the International Humanitarian Fact-Finding Commission. President Barack Obama has apologized to the charity group for the attack. Hide Caption 3 of 5 Photos: Doctors Without Borders hospital attacked in Afghanistan The attacks came as fighting intensified between Afghan government forces -- supported by U.S. air power and military advisers -- and the Taliban, which invaded Kunduz in late September. Hide Caption 4 of 5 Photos: Doctors Without Borders hospital attacked in Afghanistan "We were running a hospital treating patients, including wounded combatants from both sides -- this was not a 'Taliban base,' " said Dr. Joanne Liu, international president of Doctors Without Borders or Médecins Sans Frontières, upon release of the group's internal review of the attack. Hide Caption 5 of 5

On Sunday, the NATO-led coalition in Afghanistan said U.S. forces carried out an airstrike at 2:15 a.m. "against insurgents who were directly firing upon U.S. service members advising and assisting Afghan Security Forces." The strike took place "in the vicinity of a Doctors Without Borders medical facility" in Kunduz, it said.

The U.S. military had previously said the hospital may have been "collateral damage."

But Afghan police in Kunduz said a number of Taliban militants were hiding in the hospital compound when the strike happened.

Doctors Without Borders, which denies it lets combatants use its facilities for fighting, said such assertions from Afghan officials imply the hospital bombing was intentional.

The aid group said it had provided the GPS coordinates of the hospital to the Afghan military and the U.S.-led coalition days before the attack to avoid it being hit. No staff members reported any fighting inside the compound before the airstrike, it said.

The victims

People caught up in the blaze set off by the bombing described terrifying scenes.

#MSF nurse in Kunduz rescuing patients & staff: "There are no words for how terrible it was. In ICU 6 patients were burning in their beds." — MSF International (@MSF) October 3, 2015

"There are no words for how terrible it was. In the intensive care unit, six patients were burning in their beds," Lajos Zoltan Jecs, a nurse at the hospital, said in an account posted on the Doctors Without Borders website

International staff members were evacuated to Kabul, and critical patients sent to other facilities. Staff members who survived are either being treated at health facilities in the region, the organization reported, or have left the hospital.

French Foreign Minister Laurent Fabius called the Doctors Without Borders president Monday to express his solidarity and condolences, according to the French Foreign Ministry. Fabius expressed his hope that light would be shed on the circumstances of the tragedy.

The legal context

Establishing whether the bombing constitutes a war crime, as Doctors Without Borders asserts, will require a detailed picture of what happened.

JUST WATCHED 'Doctors without Borders' airstrike a war crime? Replay More Videos ... MUST WATCH 'Doctors without Borders' airstrike a war crime? 04:08

"You cannot, under the laws of war, attack sites such as hospitals, schools, religious buildings," said Gregory Steven Gordon, an associate professor of law at the Chinese University of Hong Kong. "However, the hospital as a building can lose its immunity if it's being used by the enemy for military attacks."

Gordon, a war crimes prosecution expert, told CNN that investigators will need to find out "exactly what kind of attacks were being carried on in the hospital, if any."

"The United States, even if attacks were being carried out from the hospital, would have to respect certain principles of precaution," he said. "In other words, they would have to make sure they were using weapons that would be the least destructive, they would have to give warnings to civilians to get them out."

The hospital

The bombs left part of the hospital in flames and rubble.

"The main hospital building, where medical personnel were caring for patients, was repeatedly and very precisely hit during each aerial raid, while the rest of the compound was left mostly untouched," said Christopher Stokes, the aid group's general director.

Photos: Taliban takes over Afghan city Photos: Taliban takes over Afghan city Afghan special forces prepare to launch an operation to retake the city of Kunduz, Afghanistan, from Taliban insurgents on Tuesday, September 29. The Taliban took control of most of the city the day before in its biggest victory since 2001. Hide Caption 1 of 5 Photos: Taliban takes over Afghan city A Taliban fighter sits on a motorcycle holding a Taliban flag in Kunduz on September 29. Hide Caption 2 of 5 Photos: Taliban takes over Afghan city Taliban fighters hug each other on September 29. Hide Caption 3 of 5 Photos: Taliban takes over Afghan city A Taliban fighter stands guard on a vehicle in Kunduz on September 29. Hide Caption 4 of 5 Photos: Taliban takes over Afghan city Taliban prisoners walk down a street after they were released by Taliban fighters from the main jail in Kunduz on Monday, September 28. Hide Caption 5 of 5

The organization said it has since been forced to close the hospital.

"There is no access to trauma care now for the civilians and for the wounded in the whole area of Kunduz, which is some kind of battleground for the moment," Stokes said.

The Taliban took over Kunduz last week, overrunning a major Afghan city for the first time since 2001. Afghan security forces, backed by the U.S.-led coalition, have been trying to drive out the insurgents.

Civilians have been caught in the heavy fighting.

Doctors Without Borders said it had treated 394 wounded people in Kunduz in less than a week. At the time of the bombing, 105 patients and their caretakers were in the hospital, along with more than 80 Afghan and international staff members, it said.

On Monday, a spokesman for the Kunduz police chief told CNN fighting was underway between the Taliban and Afghan security forces in parts of the city.

The fighting is occurring at locations where the Taliban are believed to be hiding inside civilians' houses, the spokesman said.