Army Gen. John Campbell testified before the Senate Armed Services Committee on Oct. 6. (Associated Press)

A senior U.S. general on Tuesday said the air attack that killed 22 patients and medical staffers in northern Afghanistan was not intended to strike a hospital run by an international aid group, adding to an evolving Pentagon account of one of the deadliest American strikes on a civilian target in recent history.

Gen. John F. Campbell, who commands U.S. and allied forces in Afghanistan, said the powerful U.S. gunship that struck a hospital run by Doctors Without Borders in the city of Kunduz acted in response to a request from Afghan troops facing a Taliban attack.

But, Campbell told the Senate Armed Services Committee, the United States bore ultimate responsibility for authorizing strikes on a civilian compound.

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

Campbell said a full accounting of the weekend incident, which occurred as U.S. forces sought to help the Afghan government reclaim Kunduz, the first major Afghan city to fall to the Taliban since the war began in 2001, would be available after a Pentagon investigation. He declined to give a timeline for that probe.

But numerous questions remain about how Saturday’s strike, in which an AC-130 gunship conducted repeated bombing raids on a building housing the hospital’s emergency rooms and intensive care unit, could have happened.

Campbell described the incident as a mistake, but he did not specify whether the American pilots had tried to hit another target and missed or whether they intended to strike the hospital building but did not know it was a medical facility.

Neither have officials said whether U.S. forces violated their own rules of engagement in Afghanistan, which permit the United States to use air power in three situations: for counterterrorism operations, in self-defense or to protect Afghan forces “in extremis.”

In a statement released Tuesday, Defense Secretary Ashton B. Carter said he would hold those responsible accountable.

“The U.S. military takes the greatest care in our operations to prevent the loss of innocent life,” Carter said. “And when we make mistakes, we own up to them.”

Doctors Without Borders has described the attack as deliberate and a possible war crime. Twelve of the group’s staffers and 10 patients, including three children, were killed.

“This attack cannot be brushed aside as a mere mistake or an inevitable consequence of war,” Joanne Liu, president of MSF International, said in a statement. Doctors Without Borders is also known by its French initials, MSF. The organization said it repeatedly provided the hospital’s coordinates to U.S. and Afghan authorities.

U.S. military officials have already revised their account of what occurred overnight on Saturday. On Monday, speaking at the Pentagon, Campbell said the attack was authorized after Afghan troops, under attack by the Taliban, requested American air support. That contradicted earlier statements from Pentagon officials that the strike was ordered to protect U.S. forces on the ground who were taking direct fire from the Taliban.

According to Pentagon officials, U.S. Special Operations forces were positioned in Kunduz, advising elite Afghan troops nearby, when the strike took place. It now appears that U.S. forces were not facing direct attack from the Taliban.

The incident adds fuel to a debate about the future of the limited U.S. mission in Afghanistan as the White House considers further changes to its plan for bringing the U.S. military footprint to under 1,000 troops at the end of 2016. President Obama has linked his legacy to pulling U.S. forces from Afghanistan and ending America’s longest war.

About 9,800 U.S. troops are stationed in Afghanistan. Almost 7,000 are tasked to a multinational mission to help Afghan forces fight the Taliban, while a smaller number are part of a U.S. effort to hunt down al-Qaeda and other militants.

Under questioning by lawmakers, Campbell acknowledged that he believes the current exit plan should be changed, given security conditions on the ground.

Campbell spoke as Afghan forces struggle to fully retake Kunduz. While much of the city is now under government control, the Taliban’s ability to seize a major urban area illustrates the militants’ resilience despite years of assaults from NATO forces.

Fierce clashes were reported Tuesday.

A U.S. military official, speaking on the condition of anonymity to comment freely, said U.S. forces conducted two airstrikes in Kunduz province Monday, both of which targeted insurgents “threatening Afghan and coalition forces.” Special Operations soldiers remain embedded with Afghan troops battling the Taliban in and around Kunduz.

In Kabul, Afghan President Ashraf Ghani’s government did not deny it had requested the U.S. airstrike Saturday but said the matter was being investigated.

Sayed Zafar Hashemi, a Ghani spokesman, said it would be common for the Afghan military to solicit air support from the coalition. Hashemi said most of the airstrikes that occurred in Kunduz after the Taliban overran it last week resulted from a specific request from the Afghanistan military.

Saturday’s incident was among the deadliest U.S. strikes to result in civilian casualties in Afghanistan. In July 2002, more than 40 people were killed and more than 100 were injured when a U.S. aircraft fired on a wedding party.

Of the 12 Doctors Without Borders staffers killed, three were physicians. After the attack, the group withdrew from Kunduz; it still operates five other facilities in Afghanistan.

Officials with Doctors Without Borders have raised doubts about the U.S. military’s ability to conduct a satisfactory investigation of its own actions. NATO and the Afghan government have launched separate probes.

The Afghan Ministry of Health issued a statement expressing its support for an independent probe. The ministry said the strike “threatens the health of millions of Afghans” because private charities are now reconsidering operating in the country.

“Staff no longer feel safe in any health facility anywhere in the country,” the ministry said. “And some international health organizations are questioning whether the risks of staying in the country are just too high after such an attack.”

Some Afghan leaders continue to defend the airstrike. Hamdullah Danishi, the acting governor of Kunduz province, said Taliban fighters had been using hospital grounds as a staging area from which to launch attacks on the provincial capital, Kunduz city.

Danishi said he played no role in ordering the airstrike, but he reiterated that the area around the hospital had to be cleared of militants. “We have a military decision-making council that decides such issues,” Danishi said. “I don’t know if it made the request.”

“But if it was me,” Danishi continued, “I would have ordered the airstrike.”

Afghan military leaders declined to comment.

The aircraft that carried out the Kunduz attack was an AC-130 gunship, a platform that is dedicated almost entirely to supporting Special Operations forces, such as those advising Afghan troops around Kunduz. The plane flies at a relatively low altitude and can loiter over a target. Its pilots must rely on visual targeting to strike locations on the ground.

Craig reported from Kabul. Sayed Salahuddin in Kabul and Thomas Gibbons-Neff in Washington contributed to this report.

Read more:

The bloody history of Kunduz, from Afghanistan’s ‘Convoy of Death’ to now

In Kunduz, echoes of a 1988 guerrilla assault after the Soviets withdrew

Today's coverage from Post correspondents around the world