WASHINGTON (AP) — The top U.S. commander in Afghanistan recommended on Tuesday that President Barack Obama revise his plan and keep more than 1,000 U.S. troops in the country beyond 2016, just days after a deadly U.S. airstrike “mistakenly struck” a hospital during fierce fighting in the north.

Gen. John F. Campbell told Congress that conditions on the ground have changed since Obama announced his plan in 2014 to cut the current U.S. force of 9,800 to an embassy-based security contingent of about 1,000 in Kabul post-2016. Obama has vowed to a war-weary nation to end the U.S. war in Afghanistan and get American troops out by the time he leaves office in January 2017.

Campbell said, however, that Afghanistan remains engaged in a violent battle against the Taliban, military operations in Pakistan have pushed fighters, including those linked to al-Qaida, into eastern and northern Afghanistan and the emergence of Islamic State fighters has further complicated the conflict.

Campbell, the top commander of U.S. and allied forces in Afghanistan, said that dropping to 1,000 troops would leave the United States with limited ability to train and assist the Afghan forces and even less capacity to conduct counterterrorism operations. He said the different options he has provided to his superiors are for troop levels beyond a normal embassy presence of about 1,000.

Campbell refused to discuss the numbers of troops he is recommending. But when Sen. Angus King, I-Maine, asked Campbell if he thought the president should revise his troop withdrawal plan, Campbell replied: “I will stomp my foot. Yes, sir.”

Both Defense Secretary Ash Carter and Secretary of State John Kerry have stressed the importance of continuing counterterrorism missions in Afghanistan, even into 2017.

In his opening remarks to the Senate Armed Services Committee, Campbell offered details about the airstrike on a medical clinic that Doctors Without Borders ran in Kunduz. He said a U.S. Special Operations unit that was close by was “talking to the aircraft that delivered” the firepower, which killed at least 22 people.

“To be clear, the decision to provide (airstrikes) was a U.S. decision, made within the U.S. chain of command,” Campbell said. “The hospital was mistakenly struck. We would never intentionally target a protected medical facility.”

In a possible indication that the attacking aircraft was given an improper go-ahead to open fire on the hospital, Campbell said he is requiring that every U.S. service member in Afghanistan be retrained on the circumstances in which U.S. air power can be used.

“To prevent any future incidences of this nature, I’ve directed the entire force to undergo in-depth training in order to review all of our operational authorities and rules of engagement,” he said. U.S. forces are authorized to engage in combat in Afghanistan under certain limited circumstances, such as self-defense, attacking al-Qaida or aiding Afghan forces in extreme situations.

Carter issued a statement promising a full and transparent investigation. “We will do everything we can to understand this tragic incident, learn from it and hold people accountable as necessary,” he said.

Anti-war protesters sat in the front row of the hearing with red coloring, depicting blood, on their faces. They carried signs that read: “Health care not warfare” and “Kunduz victims: RIP.” A woman who shouted “Bombing hospitals is a war crime! Stop the bombing now!” was escorted from the room.

The airstrike occurred as Afghan forces were retaking Kunduz from the Taliban. The insurgents staged a surprise attack from multiple sides of the city and held it for three days before Afghan security forces recaptured it with help from the U.S.-led coalition.

Campbell said Afghan forces have faltered at times, but they have shown no evidence of “fracturing.”

White House press secretary Josh Earnest said the future U.S. troop presence in Afghanistan would be determined by a variety of factors, including conditions on the ground in Afghanistan, remaining threats and what resources the U.S. can provide. He said Obama would consider input from his diplomatic and intelligence advisers, along with the views of the civilian leadership at the Pentagon and NATO allies.

Lawmakers also questioned Campbell about reports that Afghan forces who have worked with U.S. military personnel have sexually assaulted boys and that U.S. troops were told to ignore suspicions of abuse.

“I have required that within 30 days all personnel in theater complete additional training on human rights abuse reporting requirements,” Campbell said. “What our policy has said since 2011 is that you have to report instances of sexual abuse by the Afghan security forces up the chain of command.”

Rep. Mac Thornberry, chairman of the House Armed Services Committee, spoke by phone Tuesday with Army Secretary John McHugh urging him to delay the discharge of Sgt. 1st Class Charles Martland for assaulting an Afghan local police officer accused of sexually assaulting a young boy in 2011. Thornberry, R-Texas, said he noted “potential procedural errors in due process” while reviewing Martland’s case and suggested he be allowed to stay in the Army long enough to prepare an appeal.

__

AP National Security Writer Robert Burns contributed to this report.