Washington - President Barack Obama announced on Wednesday that 8 400 US troops will remain in Afghanistan into 2017 in light of the still "precarious" security situation in the war-ravaged country.Obama had previously vowed to slash the US troop presence from its current level of 9 800 down to 5 500 by 2017, but a resurgent Taliban, coupled with a still-struggling Afghan security force, made such a move untenable."Instead of going down to 5 500 troops by the end of this year, the United States will maintain approximately 8 400 troops in Afghanistan into next year through the end of my administration," Obama told a news conference."The decision I'm making today ensures my successor has a solid foundation for continued progress in Afghanistan, as well as the flexibility to address the threat of terrorism as it evolves," he said.Most of the US troops in Afghanistan operate under the Nato banner. About 40 Nato members and partner countries currently contribute to the overall force of nearly 13 000.It was not immediately clear whether the US decision would influence other nations' troop levels, although the issue is certain to be central at a Nato summit in Poland this week."I welcome @BarackObama's announcement on troop levels in Afghanistan. A strong signal of our continued commitment," Nato Secretary General Jens Stoltenberg said on Twitter.Obama's announcement is further acknowledgement that Afghan security forces, who took charge of the country's security in 2015, are still not ready to go it alone. They have suffered a devastating string of setbacks at the hands of the Taliban, including the temporary loss of the city of Kunduz, and more than 5 000 Afghan troops were killed last year alone. Other organisations, including the Islamic State group, have also stepped up activity."The security situation in Afghanistan remains precarious," Obama said. "Even as they improve, Afghan security forces are still not as strong as they need to be. With our help, they're still working to improve critical capabilities, such as intelligence, logistics, aviation and command and control."Obama's decision comes after General John Nicholson, the new commander of the US-led Nato mission in Afghanistan, this year conducted a review of the security situation.Republican Senator John McCain, a long time critic of Obama's military policies, welcomed the move, but said the president should have kept the entire 9 800 US troops in country.Still, he said, "the decision to retain 8 400 US troops in Afghanistan into next year is certainly preferable to cutting those forces by nearly half".US forces have been in Afghanistan since the US-led invasion to ouster the Taliban in late 2001.The United States has spent in total about $1 trillion since, and about 2 200 US lives have been lost in the longest war in US history.