By Roberta Rampton and Jeff Mason

WASHINGTON (Reuters) - Reversing policy on Afghanistan, President Barack Obama announced on Thursday he will prolong the 14-year-old U.S. military engagement there, effectively handing off the task of pulling out troops to his successor.

Calling it a "modest but meaningful" adjustment to winding down the American presence in Afghanistan, Obama said Afghan forces were not yet as strong as they needed to be given a "very fragile" security situation and the United States will maintain a force of 9,800 through most of 2016.

Obama had previously aimed to withdraw all but a small U.S.-embassy based force in the capital, Kabul, before he leaves office in January 2017. Under the new plan, troops will be drawn down to 5,500 starting sometime in 2017 and will be based at four locations - Kabul, Bagram, Jalalabad and Kandahar.

Obama has been under pressure from his military advisers, Republicans, and a bipartisan group of national security experts to keep U.S. forces in Afghanistan, particularly as Afghan forces have struggled in assaults from Taliban militants, who briefly took over the northern city of Kunduz.

On Thursday, Republican critics warned against rushing to cut troops in 2017. John McCain, chairman of the Senate Armed Services Committee, said the proposed 5,500 U.S. troops would be inadequate to handle both counterterrorism missions and training and advising Afghan troops.

McCain said it was unlikely that senior military leaders and commanders on the ground had recommended this force level, adding, "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."

At the Pentagon, Defense Secretary Ash Carter rebuffed criticism from McCain and others over the planned 5,500 troops.

"We do look at it as enough. We did a lot of homework on this," Carter told reporters. Pentagon spokesman Peter Cook said U.S. allies would also offer a significant contribution of forces but declined to offer details.

Obama, a Democrat, has faced steady criticism from Republicans on security issues as he has wound down the wars in Iraq and Afghanistan that he inherited when he took office in 2009.

In his remarks on Thursday, he focused on the rationale for delaying a complete withdrawal, telling Americans that he did not support the idea of "endless war" but arguing Afghanistan's stability is vital to U.S. security. Troops would remain out of combat roles, focused on training and advising Afghan forces, and ensuring that any al Qaeda remnants do not threaten U.S. security, he said.

"This isn't the first time those adjustments have been made. This probably won't be the last," Obama said, defending the change of course. "I suspect that we will continue to evaluate this going forward, as will the next president."

The U.S.-led coalition in Afghanistan ended its combat mission at the end of 2014, and since then Afghan troops have been in charge of the country's security, with help from U.S. and NATO troops.

U.S. military and administration officials have been discussing a slower withdrawal timetable since the March visit to the White House of Afghan President Ashraf Ghani and Chief Executive Abdullah Abdullah. Obama said he spoke to the leaders on Wednesday.

Ghani has been more supportive of the U.S. presence than his predecessor, Hamid Karzai, who left office last year. Obama stressed that he viewed Washington as having a solid partner in the Afghan president.

Ghani praised Obama's decision, saying the assistance would help his government's forces fight "a ruthless and cunning enemy."

U.S. troops were first sent to Afghanistan by Obama's predecessor, George W. Bush, soon after the Sept. 11, 2001, attacks on the United States, in a U.S.-led effort to destroy al Qaeda and to oust the then-ruling Taliban that had sheltered the militant group.

GUARDED SUPPORT FROM CONGRESS

Republican Speaker John Boehner said the U.S. House of Representatives would review the decision but said Obama was right to give up on "arbitrary political deadlines" for the troop drawdown.

Reaction from Democrats, who have pushed for an end to U.S. involvement in the country, was muted. Democratic House Leader Nancy Pelosi stopped short of saying she supported Obama, noting in a statement that she looked forward to "a high-level briefing" on the issue.

Story continues