After months of un­expectedly swift advances, the U.S.-led war against the Islamic State is running into hurdles on and off the battlefield that call into question whether the pace of recent gains can be sustained.

Chaos in Baghdad, the fraying of the cease-fire in Syria and political turmoil in Turkey are among some of the potential obstacles that have emerged in recent weeks to complicate the prospects for progress. Others include small setbacks for U.S.-

allied forces on front lines in northern Iraq and Syria, which have come as a reminder that a strategy heavily reliant on local armed groups of varying proficiency who are often at odds with one another won’t always work.

When President Obama first ordered U.S. warplanes into ­action against the extremists sweeping through Iraq and Syria in 2014, U.S. officials put a three- to five-year timeline on a battle they predicted would be hard. After a rocky start, officials say they are gratified by the progress made, especially over the past six months.

Since the recapture of the northern Iraqi town of Baiji last October, Islamic State defenses have crumbled rapidly across a wide arc of territory. In Syria, the important hub of Shadadi was recaptured with little resistance in February, while in Iraq, Sinjar, Ramadi, Hit and, most recently, the town of Bashir have fallen in quick succession, lending hope that the militants are on the path to defeat.

“So far, in terms of what we had hoped to do, we are pretty much on track,” said a U.S. official who spoke on the condition of anonymity in order to discuss sensitive subjects. “We’re actually a little bit ahead of where we wanted to be.”

The fight, however, is entering what Pentagon officials have called a new and potentially harder phase, one that will entail a deeper level of U.S. involvement but also tougher targets.

In an attempt to ramp up the tempo of the war, the U.S. military is escalating its engagement, dispatching an additional 450 Special Operations forces and other troops to Syria and Iraq, deploying hundreds of Marines close to the front lines in Iraq and bringing Apache attack helicopters and B-52s into service for the air campaign.

The extra resources are an acknowledgment, U.S. officials say, that the war can’t be won without a greater level of American involvement. The targets that lie ahead are those that are most important to the militants’ self-proclaimed caliphate, including their twin capitals of Raqqa in Syria and Mosul in Iraq and, to a lesser extent, Fallujah, a key concern because of its proximity to Baghdad.

The Islamic State will have occupied those cities for well over two years before the offensives begin, far longer than any of those it has lost so far. The battle for Mosul, long a Pentagon priority, has already been delayed by at least a year, in part because of the Islamic State’s seizure a year ago of the city of Ramadi in the province of Anbar. Ramadi was recaptured in December, but only after a significant diversion of resources and time.

“The defenses that they have there are much more developed than what they had the ability to do in Ramadi, so it’s going to get harder the closer we get to Mosul, there’s no doubt about it,” said Maj. Gen. Gary J. Volesky, who commands the land-forces component of the U.S.-led coalition out of Baghdad.

After being caught unprepared by the Ramadi upset, he and other U.S. officials now decline to put a time frame on the Mosul offensive. An early attempt to sever one supply route to the city in March did not go well, with two newly trained Iraqi army brigades forced to retreat under intense Islamic State fire from the small but strategically important village of Al-Nasr, about 40 miles to the south. It was a reminder, said Col. Steve Warren, a U.S. military spokesman, that “we’ve got a foot on his neck but he’s still got some fight in him.”

As the war cuts deeper into the militants’ core territories, the pace will inevitably slow, officials say. “Now we’re organizing ­Mosul, and we are going to organize some other things, too, so there will be a natural pause, which isn’t necessarily a strategic setback,” said the U.S. official. “We have to pause, reset a bit and do some things.”

The deepening U.S. military engagement won’t, however, untangle the web of political complexities that appears to be tightening around a strategy critics long have charged is too focused on short-term military gains.

While scoring some significant advances on the ground, the strategy has not yet found answers to the wider political disputes that helped fuel the rise of the Islamic State and could yet undermine the long-term sustainability of military gains, said Robert Ford, the last U.S. ambassador to Syria, who is now with the Washington-based Middle East Institute.

“The Americans are so happy every time a village falls, they lose sight of the forest while looking at all the trees,” he said.

The recent dramatic storming of Baghdad’s fortified Green Zone by supporters of the Shiite cleric Moqtada al-Sadr offered one example of the kind of conflicts that could erupt in Iraq well before the militants are defeated, he said.

“The problem in Baghdad underlines how tenuous the government situation is,” Ford said. “This isn’t something Apaches and F-16s can fix. You must deal with the politics as much as you deal with the military.”

U.S. officials say they have seen no fallout yet from the fracas in Baghdad, but they don’t rule out that there could be one if the political instability continues.

Of greater immediate concern, they say, is the upheaval in Turkey, where Prime Minister Ahmet Davutoglu last week announced his intention to step down after losing out in a feud with President Recep Tayyip ­Erdogan. ­Davutoglu has long worked closely with U.S. officials and had been seen as a moderating influence on the more unpredictable Erdogan, who frequently lashes out with criticisms of his American allies and has displayed fluctuating levels of enthusiasm for the fight against the Islamic State.

One major effort for which the United States needs Turkish engagement is a faltering offensive against the Islamic State in the northern Syrian countryside of Aleppo province, bordering Turkey. A force of Turkish and U.S.-backed rebels swiftly advanced last month into the key Islamic State town of Al-Rai, then was equally swiftly pushed back.

It was an early test of the fraught effort to train and equip a force of moderate Syrian rebels to take on the militants in northern Syria, which has now mostly been subcontracted to Turkey. Officials acknowledge that they were disappointed with the poor rebel performance, ascribed by both Syrians and U.S. officials more to divisions within the ranks of the rebels than any external factors.

Cutting the Islamic State’s vital supply route to Turkey is considered an essential prerequisite for any eventual offensive to retake Raqqa. The 250 Special Operations troops dispatched to Syria last month are charged with training an Arab force to lead the Raqqa offensive — but there won’t be a Raqqa offensive until the northern Aleppo part of the puzzle has been solved, U.S. officials say.

The recent resumption of fighting around the nearby city of Aleppo has come as a fresh reminder that the war in Syria will continue to draw resources away from the Islamic State fight. Peace talks in Geneva aimed at ending the conflict have deadlocked, eroding hopes that a political solution is in sight.

Russia, though not part of the U.S.-led coalition, had contributed to the building of pressure on the Islamic State by supporting the Syrian government’s recapture in March of the ancient city of Palmyra. But Russia has diverted its military resources from the Islamic State front toward Aleppo, considered a greater priority for the government than the Islamic State-held territories to the east, according to a person familiar with the discussions between Syria and its allies Iran, Hezbollah and Russia over military operations.

As a Russian orchestra played Bach and Prokofiev in celebration of the Palmyra victory at the city’s Roman amphitheater last week, Islamic State fighters overran the nearby gas field of Shaer, their first conquest in many months.

One concern is that any hiatus in the fight could give the Islamic State a chance to regroup, refresh and revive its badly dented image of invincibility by launching new assaults, such as the one last week that killed U.S. Navy SEAL Charles H. Keating IV. Warren characterized the attack as an effort to “detract from the beat-down they’ve taken everywhere else.”

It was repelled, however, only with the help of intense U.S. airstrikes, underscoring the vital role the United States plays in securing recaptured territory.

“In the short term, as long as the Americans are there, I don’t think they’re going to rampage like they did in 2013 and 2014,” Ford said of the militants. “But were you to remove that air power and the capabilities the Americans bring, I could imagine them making gains again on the ground.”

Loveday Morris in Baghdad contributed to this report.

Read more

How the Syrian revolt went so horribly, tragically wrong

Islamic State claims strikes on Turkish artillery as tensions rise on border

Turkey’s prime minister resigns amid high-level rifts and deepening crises

Today’s coverage from Post correspondents around the world