WASHINGTON (AP) -- When President Barack Obama leaves office in 15 months, he'll hand his successor military conflicts in the two countries where he promised to end prolonged war: Afghanistan and Iraq.
There will be far fewer troops in each, and the American forces won't have a direct combat role. But for Obama, it's nevertheless a frustrating end to a quest that was central to his political rise.
"As you are all well aware, I do not support the idea of endless war," Obama said Thursday as he announced he was dropping plans to withdraw nearly all U.S. forces from Afghanistan by the end of next year. Instead, he'll leave office with at least 5,500 on the ground to help protect gains made during 14 years of war.
As a result, the winner of the 2016 presidential election will become the third American commander in chief to oversee the Afghan war.
The president's goal of ending the wars he inherited had already been tarnished by the return of U.S. forces to Iraq last year, 2½ years after they left. The troops are there to help Iraq fight the Islamic State, a mission Obama has said will likely outlast his presidency.
Obama never mentioned Iraq Thursday, but the tenuous situation there has no doubt hung over his decision-making on Afghanistan. Obama's critics contend the decision to withdraw from Iraq created the vacuum that allowed the Islamic State to thrive and warned leaving Afghanistan next year could have the same consequences.
Military commanders have argued for months that Afghans needed additional assistance and support from the U.S. to beat back a resurgent Taliban and keep the Islamic State from using the country as a haven.
The president had originally planned to withdraw all but a small embassy-based force from Afghanistan in late 2016, shortly before leaving office. Under the new $15 billion-a-year plan, the U.S. will maintain its current force of 9,800 through most of 2016, then begin drawing down to 5,500 late in the year or in early 2017.
Obama's decision thrusts the war into the middle of a presidential campaign that so far has barely touched on Afghanistan. Candidates now will be pressed to say how they will try to do what Obama could not - end a conflict that has killed more than 2,230 American service members and cost more than $1 trillion.
On Thursday, leading Democratic candidates - including Hillary Rodham Clinton, who served as Obama's secretary of state - were silent about the president's decision. Last year, after Obama announced his original 2016 withdrawal timeline, Clinton said she would be open to extending the U.S. presence if Afghan leaders made that request.
The president's revamped plan was welcomed by several Republican presidential candidates, but some said 5,500 troops would not be enough.
"If he is truly committed to fighting terrorism and securing a stable Afghanistan, he shouldn't shortchange what our military commanders have said they need to complete the mission," said Jeb Bush. The former Florida governor did not say how many troops he thought would be sufficient.
According to a defense official, the president approved the highest number requested by commanders, with the greatest amount of flexibility.
Former technology executive Carly Fiorina called Obama's decision a "recognition of reality" in Afghanistan. And New Jersey Gov. Chris Christie said the president was "waking up to the fact that disengaging America from the world and allowing there to be safe havens for terrorists is not the right way to protect American homeland security and national security."
Kentucky Sen. Rand Paul was an outlier among Republican candidates. He vowed to remove U.S. troops from Afghanistan immediately if elected president.
U.S. officials say Afghan President Ashraf Ghani asked Obama to keep the troops in his country when they met in Washington earlier this year. Obama sees Ghani as a more reliable partner than former President Hamid Karzai, a mercurial leader who deeply frustrated the White House.
Obama's meeting with Ghani set off a months-long re-evaluation of the U.S. role in Afghanistan.
The president's decision was reinforced when Taliban fighters took control of the key northern city of Kunduz late last month, leading to a protracted battle with Afghan forces supported by U.S. airstrikes. During the fighting, a U.S. air attack hit a hospital, killing 12 Doctors Without Borders staff and 10 patients.
The Associated Press reported Thursday that American special operations analysts were gathering intelligence on the hospital days before it was destroyed because they believed it was being used by a Pakistani operative to coordinate Taliban activity.
The U.S. forces that Obama spoke of Thursday will continue with their current two-track mission: counterterrorism operations and training and assisting Afghan security forces. The troops will be based in Kabul and at Bagram Air Field, as well as bases in Jalalabad and Kandahar.
Ghani welcomed the decision, saying it sent a message to the Taliban and terrorist groups that their actions "will produce no result other than defeat."
Officials said the drawdown to 5,500 would begin late next year or in early 2017, with the pace determined by military commanders. They said NATO allies had expressed support for extending the troop presence in Afghanistan, but they did not outline any specific commitments from other nations.
White House officials said they were still pleased with the progress Obama had made in drastically reducing the number of U.S. troops from a high of about 100,000 in 2010 and ending America's direct combat role.
Still, there's no doubt the situation he'll leave behind is far different from what he envisioned last year, when he announced it was time to "turn the page" and withdraw from Afghanistan.
"Americans have learned that it's harder to end wars than it is to begin them," he said at the time.
AP writers Lolita C. Baldor, Jill Colvin, Catherine Lucey, Thomas Beaumont, Deb Riechmann and Lynne O'Donnell contributed to this report.
Follow Julie Pace at http://twitter.com/jpaceDC