WASHINGTON (AP) — Taking America off a permanent war footing is proving harder than President Barack Obama may have suggested.

U.S. troops are back in Iraq, the endgame in Afghanistan is requiring more troops — and perhaps more risks — than once expected and Obama is saddled with a worsening, high-stakes conflict in Syria.

Last spring, Obama described to newly minted Army officers at West Point how “the landscape has changed” after a decade of war. He cited then-dwindling conflicts in Iraq and Afghanistan. And he said Osama bin Laden, whose plotting from an al-Qaida sanctuary in Afghanistan gave rise to what became America’s longest war, “is no more.”

“You are the first class to graduate since 9/11 who may not be sent into combat in Iraq or Afghanistan,” Obama declared to a burst of applause.

But once again the landscape has changed.

Once again the U.S. is engaged in combat in Iraq — not by soldiers on the ground but by pilots in the sky. And the Pentagon is putting “boots on the ground” to retrain and advise Iraqi soldiers how to fight a new menace: the Islamic State militants who have their roots in the Iraq insurgency that U.S. troops fought from 2003-2011.

Once again there are worsening crises demanding U.S. military intervention, including in Syria. Four months after his speech at the U.S. Military Academy, Obama authorized American pilots, joined by Arab allies, to begin bombing Islamic State targets in Syria with the aim of undermining the group’s base and weakening its grip in Iraq.

And once again the U.S. is on a path that could expand or prolong its military role in Afghanistan. The U.S. combat role there ends Dec. 31, but Obama has authorized remaining U.S. troops to attack the Taliban if they pose a threat to U.S. military personnel who will continue training Afghan security forces for at least the next two years.

At his final news conference of 2014, Obama spoke just 18 words on Afghanistan, saying, “In less than two weeks, after more than 13 years, our combat mission in Afghanistan will be over.”

As of Dec. 16, a total of 2,215 U.S. troops had died in Afghanistan and 19,945 had been wounded. In Iraq, 4,491 died and 32,244 wounded.

The wars produced far-reaching changes in how the military operates. Among the most significant: the frequent use of elite Special Operations forces, including the highly secretive Navy SEALs and the Army Delta force. The high pace of their counterterrorism operations in both Iraq and Afghanistan, and occasionally elsewhere in the Middle East, has given the president a more finely tuned tool of military power.

Shortly before the 2003 invasion of Iraq, Obama, an Illinois state senator, called it a “dumb war.” He warned of unforeseen costs and consequences, arguing that President George W. Bush would be smarter to finish what he started in Afghanistan.

Obama’s promise to end the war in Iraq was a key to winning the White House in 2008. He delivered on that promise, but the war was not really over. Events conspired to pull Obama back in. In January 2014 the Islamic State seized the Sunni city of Fallujah, scene of the bloodiest fighting of the U.S. war a decade earlier.

The military expanded their offensive in June, sweeping across much of northern Iraq and capturing key cities, including Mosul. Whole divisions of the Iraqi army folded, abandoning tanks and other American-supplied war equipment to the militants. That was not just a boon to the militants. It was a blow to U.S. prestige.

Suddenly, inexplicably, Baghdad seemed within the Islamic State’s reach.

Two months later Obama gave the go-ahead for U.S. airstrikes in Iraq. He ruled out sending ground combat forces, but at some point next year he may face yet another tough choice: whether to allow U.S. military advisers to accompany Iraqi ground forces as they launch major counteroffensives, including an expected push to retake Mosul. Up to now, U.S. advisers have been coordinating with Iraqi forces from a safer distance.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, repeatedly has said he will recommend ground combat troops if necessary.

As Obama approaches the end of his sixth year in office he awaits Congress’ formal endorsement of his new war against Islamic State. The administration wants a legal basis for the war, known as an authorization for use of military force, rather than continuing to rely on congressional resolution granted after 9/11 to justify the invasion of Afghanistan, wage war in Iraq and pursue al-Qaida elsewhere.

Obama has not shied away from using limited military force in other places, such as Pakistan, Yemen and Somalia, when he decided that terrorists there threatened the U.S. Just weeks ago he authorized a U.S. commando raid in Yemen to rescue a U.S. civilian held hostage by al-Qaida’s affiliate there. The hostage, Luke Somers, was shot just as the commandos arrived and died of his wounds in U.S. custody.

Obama insists he has kept his word to end America’s big wars, the occupations and nation-building efforts that began with such promise in both Afghanistan and Iraq but ultimately defied U.S. hopes for clear victories.

In his speech Dec. 15 at Fort Dix, N.J., Obama said 90 percent of the troops that were deployed to war zones when he took office are now home.

“The time of deploying large numbers of ground forces with big military footprints to engage in nation-building overseas — that’s coming to an end,” he said. “Going forward, our military will be leaner” but ready for “a range of missions.”