WASHINGTON (Reuters) - The U.S. military took responsibility on Tuesday for a deadly air strike on a hospital in the Afghan city of Kunduz, calling it a mistake and vowing to hold people accountable.

U.S. Army General John Campbell, commander of the Resolute Support Mission and United States Force - Afghanistan, testifies before a Senate Armed Services Committee hearing on "The Situation in Afghanistan" on Capitol Hill in Washington October 6, 2015. REUTERS/Joshua Roberts

Saturday’s strike on an Afghan hospital run by Doctors Without Borders, or Medecins Sans Frontieres (MSF), killed 22 people and deeply angered the medical charity. MSF officials have blamed the United States, demanding an independent investigation into an attack it called a war crime.

Defense Secretary Ash Carter said the Pentagon “deeply regrets” the loss of life. “The U.S. military takes the greatest care in our operations to prevent the loss of innocent life, and when we make mistakes, we own up to them. That’s exactly what we’re doing right now,” Carter, who was traveling in Europe, said in a statement.

“We will do everything we can to understand this tragic incident, learn from it, and hold people accountable as necessary,” he said.

Earlier in Washington, the American commander of international forces in Afghanistan, Army General John Campbell, called the strike a mistake made within the U.S. chain of command.

The comments by Carter and Campbell were the most direct acknowledgement yet by the U.S. government that the strike on the hospital was carried out by U.S. forces. On Monday, Campbell said only that U.S. forces had responded to a request for support from Afghan forces.

In testimony to the Senate Armed Services Committee, Campbell also made clear he favored a rethink of a plan to withdraw almost all U.S. troops by the end of next year. He said rising threats in Afghanistan from the Islamic State and al Qaeda were among factors informing his recommendations to the White House on future troop levels.

Campbell said U.S. forces had responded to a request from Afghan forces and provided close air support as they engaged in a fight with Taliban militants in Kunduz, a provincial capital that the Taliban captured late last month.

“To be clear, the decision to provide aerial fires was a U.S. decision made within the U.S. chain of command,” Campbell said. He added that U.S. special forces nearby were communicating with the aircraft that delivered the strikes.

“A hospital was mistakenly struck,” Campbell said. “We would never intentionally target a protected medical facility.”

President Barack Obama expected steps to be taken to prevent such an incident from recurring, White House spokesman Josh Earnest said on Tuesday.

The government of President Ashraf Ghani, heavily dependent on Washington for military support and far less critical of the United States than his predecessor Hamid Karzai, has held back from directly criticizing the United States.

But an Afghan military officer took issue with the idea that Afghan forces had called for a strike against the hospital.

Abdullah Guard, commander of Afghan special forces in Kunduz, said his men had been under heavy fire in the area near the hospital, fighting a Taliban force estimated at around 500 men.

“It is possible our forces might have called for an air strike to hit the enemy position, but that doesn’t mean to go and bomb the hospital,” he told Reuters. He was speaking before Campbell’s testimony on Tuesday, in which the American general made clear the decision to conduct the strike was a U.S. one.

Campbell said on Tuesday he had directed forces under his command to undergo training to review operational authorities and rules of engagement to prevent further incidents like Kunduz.

RENEWED ATTENTION ON MISSION

The incident, along with the Taliban’s capture of Kunduz, has cast renewed attention on the 14-year U.S. mission in Afghanistan.

Many members of Congress are deeply concerned about Obama’s plans for a final withdrawal of U.S. forces. The president is reassessing the timetable for a drawdown that currently envisages removing all but about 1,000 U.S. soldiers by the end of 2016.

“The world walked away from Afghanistan once before and it descended into chaos that contributed to the worst terrorist attack ever against our homeland,” said Senator John McCain, the Republican chairman of the armed services committee, referring to the Sept. 11, 2001, attacks that were planned by al Qaeda militants sheltered by the then-ruling Taliban in Afghanistan.

“We cannot afford to repeat that mistake,” McCain said.

Campbell said counterterrorism missions would be less effective if the U.S. presence in Afghanistan was limited to a small force based in the capital. He said there were some 1,000-3,000 Islamic State members in Afghanistan, although many of them were disaffected Taliban members who were “rebranding” themselves.

He declined to provide specifics about recommendations he had made to the White House about force levels, but said they included an option for more troops than just a small embassy-based force. There are currently around 9,800 American troops in Afghanistan.

When asked by Senator Angus King whether his judgment was that conditions in Afghanistan would require revision of the withdrawal plan, Campbell responded: “Yes, sir.”