Reversing his promise to bring all but a handful of U.S. troops home from Afghanistan this year, President Barack Obama said Thursday that thousands will remain when his successor is sworn in as commander-in-chief in early 2017.

And he hinted that the next president – the third to cope with ongoing wars in Afghanistan and Iraq – may need to further extend those commitments.

"I suspect that we will continue to evaluate this going forward, as will the next president," Mr. Obama said in a short speech from the White House.

Story continues below advertisement

The President's detractors claim he has been too timid, too willing to lead from behind and partially responsible for the rise of Islamic State because he insisted on pulling all U.S. troops out of Iraq in 2011 to fulfill a campaign promise. The critics offered only tepid endorsement of Mr. Obama's change of policy in Afghanistan.

"It would have been far better to halt all further troop withdrawals and allow President Obama's successor to determine what is warranted based on conditions on the ground," said Senator John McCain, the Arizona Republican defeated by Mr. Obama in 2008.

Kevin McCarthy, the California Republican and Majority Leader in the House of Representatives, offered faint praise. "This announcement demonstrates that President Obama doesn't want to repeat his mistakes in Iraq by withdrawing prematurely and leaving a power vacuum open to extremists."

At least some Democrats were equally dismayed, albeit for different reasons. "Today, the longest war in American history just got longer, said Representative James McGovern of Massachusetts. "I am disappointed that after 14 years of war, we are talking about continuing our military presence there instead of finding the political solution that is so desperately needed."

Mr. Obama admitted his plan to bring all U.S. troops home from Afghanistan by the end of this year was no longer viable. "I know many of you have grown weary of this conflict," he told Americans.

Still, he maintained, the weakness of Afghan security forces and recent Taliban battlefield gains required that the nearly 10,000 U.S. troops currently in Afghanistan remain at least through the 2016 summer fighting season. Mr. Obama said he hopes to cut that force in half by the end of next year, leaving roughly 5,000 troops in Aghanistan for the next president.

"The bottom line is the security situation is still very fragile," Mr. Obama said. Afghan forces "are still not as strong as they need to be," he added.

Story continues below advertisement

Last year, amid much fanfare, Mr. Obama announced all 10,000 U.S. troops would be home by the end of 2015, leaving only a small force to guard the embassy in Kabul and putting security of Afghanistan in the hands of its own security forces.

"The bottom line is, it's time to turn the page on more than a decade in which so much of our foreign policy was focused on the wars in Afghanistan and Iraq," he said in May, 2014.

Since then, Mr. Obama has sent thousands of troops back to Iraq and launched an air war against Islamic State. With Thursday's announcement, he made clear that his successor will deal with U.S. forces engaged in at least two hot wars.

Senior U.S. commanders have been warning for months that a complete pullout from Afghanistan was risky until Afghan forces have proven themselves capable of defeating the Taliban.

Despite spending more than $60-billion (U.S.) and more than a decade training and equipping the Afghan forces, recent Taliban battlefield victories have dramatically shown Kabul's army cannot yet defend the nation.

Last month, the Taliban routed Afghan forces in Kunduz. It was the first time the Taliban had seized a major Afghan city since being defeated by the United States in 2001, after then-president George W. Bush launched a war in the wake of the Sept. 11 al-Qaeda attacks on New York's twin towers and the Pentagon.

Story continues below advertisement

In Kunduz, it took massive reinforcements of Kabul's best troops to retake the city, along with U.S. Special Forces and repeated U.S. air strikes, one of which killed scores in a clearly identified hospital.

At the same time, Taliban advances have repeatedly cut the main highway linking Kabul and Kandahar, forcing thousands to flee and proving – again – the inadequacy of Afghanistan's army, which has a nominal strength of 200,000.