WASHINGTON — The United States will keep 9,800 troops in Afghanistan through the end of 2015 on its way to withdrawing all forces — save a small security staff at the US Embassy in Kabul by the end of 2016 — the White House announced Tuesday.

The announcement hardly comes as a surprise, as military officials and White House aides have been signaling for weeks that the administration was open to rethinking its Afghan drawdown strategy, which would have US troop presence there falling to 5,500 by the end of 2015.

The revamped strategy comes just after Defense Secretary Ash Carter returned from his first trip to Afghanistan where he met with US military leaders and new president Ashraf Ghani and Chief Executive Abdullah Abdullah, all of whom have lobbied for higher US troop numbers, at least through the rest of this year.

The new Afghan leadership has also gone to great lengths to repair the often contentious relationship between Washington and Kabul, which suffered under the erratic stewardship of former President Hamid Karzai.

During a joint White House press conference with Ghani on Tuesday afternoon, President Barack Obama insisted that his campaign promise to end the US military footprint in Afghanistan is unchanged, and that "our transition out of a combat role has not changed." The 9,800 troops who will remain will simply be there for "a few extra months," he said.

"We want to make sure we're doing everything we can to help Afghan security forces succeed, so we don't have to go back" to a huge American troop presence.

At a meeting at Camp David on Monday, Carter also announced that the US would commit to help fund the Afghan Army and police at a level of 352,000 through 2017. While no dollar figures were attached to the announcement, previous estimates have put the sustainment of a force that size at more than $4 billion a year, which would be in line with the $4.1 billion Washington plans on spending to build the Afghan security forces in 2015.

The request for fiscal 2016 is $3.8 billion for Afghan forces.

At the White House, Obama said "this visit is an opportunity to begin a new chapter in the partnership between our two nations. We agreed to keep in place our close security cooperation. Afghanistan remains a very dangerous place."