Lingering problems with local security forces and the resurgence of Taliban fighters may force U.S. troops to stay longer in Afghanistan than previously planned, the top American military commander in the region suggested on Tuesday.

In testimony before the Senate Armed Services Committee, Army Gen. John Campbell — head of U.S. Forces Afghanistan — said that local security forces "cannot handle the fight alone" without assistance from foreign allies and gaining that capability will take "well beyond this year."

As a result, Campbell said he has already offered adjustments to public plans to remove all U.S. troops from Afghanistan by 2017, with the exception of an embassy security contingent. He would not offer specifics on those recommendations, but hinted that changing factors in the region would make leaving troops there longer more appealing.

"If we draw down [to an embassy security presence], we would have very limited train and advise capability," he said. "It will take much longer to train Afghan forces in many of those critical areas."

According to outside news reports, the White House is considering a plan to keep up to 5,000 troops in Afghanistan past the end of 2016. Currently about 10,000 U.S. service members and 4,000 foreign allies are stationed there, in training and support roles.

"If we were to fail in this worthwhile mission, Afghanistan would once again become a sanctuary for al-Qaida and other terrorists," he said in his testimony. "The Afghans welcome the opportunity to shape their destiny, but they still desire, need and deserve our assistance."

Keeping troops embedded longer in the already 14-year war would appease critics on Capitol Hill who have accused President Obama of endangering the region's security by announcing plans to withdraw too quickly.

On Tuesday, committee chairman Sen. John McCain, R-Ariz., again blasted the White House's "politically driven withdrawal" as potentially causing a security vacuum, potentially leading to post-war problems like those seen in Iraq today.

"If we have learned anything from that nightmare, it is that wars do not end just because politicians say so," he said.

But the decision comes at a problematic time for U.S. forces in Afghanistan.

Earlier this month, six airmen were killed in a non-combat plane crash. A day later, U.S. aircraft bombed a hospital near Kunduz, an attack U.S. forces initially blamed on Afghan fighters calling for support during a firefight.

Campbell would not go into detail on that incident, noting only that multiple investigations are underway. He said U.S. forces were on the ground near the fight and authorized the attack, but added "we would never intentionally target a medical facility."

He also largely dismissed gains by Taliban forces in recent months, saying that military forces predicted "uneven" performance from Afghan forces as they became more independent and were tested by enemy fighters.

Still, Campbell noted that having a strong American counterterrorism footprint would bring more stability to the region, and much work needs to be done before those local forces can be fully trained. That will require "strategic patience" from lawmakers and the public.

Military commanders have already slowed their original plans to half the number of U.S. troops in Afghanistan by the end of this year. Campbell said he believes without any other strategic changes, the American presence will stay around 9,800 until next May, then begin pulling back.

But he also noted the plan for now is still to remove most of those troops by the end of 2016, including closing bases like Bagram Airfield.