The Kurdish-led Syria Democratic Forces raise their flag in the Syrian town of Manbij after driving the Islamic State out of the area, in this file photo released by Hawar news on Aug. 8. (Uncredited/AP)

The Pentagon’s decision to arm a mostly Syrian Kurdish force has paid big dividends in northern Syria, where the Islamic State has been on the run in recent months. Backed by U.S. air power, ­Kurdish-led offensives have captured important pieces of the radical group’s “caliphate,” including the town of Manbij in August.

Then Turkish tanks and warplanes entered Syria last week and began targeting the Kurds, their long-standing enemy. But what happened next blindsided Kurdish leaders: Their American allies sided with the Turks — and ordered the Kurdish forces to hand over hard-won territory.

“Unfortunately, as Kurdish allies fighting against terrorism and making a lot of victories, we expected more from the United States,” said Idriss Naasan, a former official in the Kurds’ self-
proclaimed government in Syria who is living in the northern town of Kobane. “We expect them to support us and not let Turkey target us.”

Across Syrian Kurdish regions, a sense of betrayal by Washington is setting in, threatening to weaken the campaign against the Islamic State, also known as ISIS and ISIL.

In Turkey, as well, there is mounting anger at the Obama administration for demanding that Turkish forces stop battling the Kurds in northern Syria. The headline of a strongly worded editorial in a pro-government newspaper this week declared that Turkey “has a right to defend itself against” the Kurdish militias and the Islamic State.

“US can like it or lump it,” the headline said.

On an increasingly complex battlefield shaped by ­long-simmering rivalries, the United States is now caught between two vital partners, the Kurds and its NATO ally Turkey. Despite U.S. pleas for an end to the fighting, both sides have vowed to protect their respective interests in Syria, underscoring the limits of U.S. influence and how much the Syrian war is a contest of competing aspirations.

“We in the U.S. and Europe may see ISIS as the primary threat,” said Anthony Cordesman, a Middle East expert with the Center for Strategic and International Studies. “But for everyone else, it is a struggle for national, ethnic or sectarian power and identity.”

“The U.S. can only do so much in this environment,” he added. “It is not going to persuade Turkey to give up its national interests, and it will not persuade any Kurdish factions not to serve their interests.”

On Tuesday, U.S. officials said both sides had agreed to a temporary truce. But on Wednesday, senior Turkish officials vowed to keep attacking the Kurdish forces, saying they will never negotiate with them.

The Kurdish forces are widely seen as the most effective partner in the fight against the militants in Syria, and the Pentagon has invested hundreds of millions of dollars in arming and training their allies.

The question now is whether the Kurds will keep fighting the Islamic State with the same motivation and zeal, particularly in the expected campaign to liberate the city of Raqqa, the capital of the militants’ self-proclaimed ­caliphate.

“Kurdish fighters fought and died for a city the U.S. is now requesting they evacuate,” said Michael Horowitz, a senior analyst at the Levantine Group security consultancy, referring to Manbij. “I think the Syrian Kurds will think twice before they ­engage in any additional U.S.-
backed offensive.”

It is now clear that national interests drove Turkey to launch its offensive into northern Syria to seize the Islamic State-
controlled border town of Jarabulus last week. The U.S.-backed Syrian Democratic Forces, or SDF, dominated by the Syrian Kurdish People’s Protection Units, known by the acronym YPG, had moved northward into the area after securing Manbij.

Turkey is worried about Syrian Kurdish aspirations to create an independent state along its border by linking the Kurdish-
majority enclaves of Kobane and Afrin, which are about 120 miles apart. Turkey fears that could embolden its own restive Kurdish militancy, which has ties to the Syrian Kurds and has staged countless attacks on Turkish soil.

Soon after Turkish forces and Syrian rebels, also backed by the United States, pushed across the border, the United States ordered the Kurdish fighters to leave Manbij and head east across the Euphrates River. YPG officials said they complied, but Turkey claimed they had not kept their pledge.

In fierce clashes, Turkey and its Syrian rebel proxies pushed Kurdish-allied forces southward toward Manbij, seizing nearly two dozen villages along way. There was little focus on fighting the Islamic State, prompting public concerns from senior U.S. ­officials.

Pentagon spokesman Peter Cook praised the Kurdish forces, describing the SDF as “a reliable and capable force” that has “fought hard and sacrificed” for Syria. He and other U.S. officials described the clashes as “unacceptable” and urged Turkey, its proxies and the SDF to end the fighting.

But that did not satisfy Syrian Kurds, who said that Washington had buckled to Turkish pressure.

“Let Turkey recruit an army for the U.S. to liberate Raqqa,” tweeted Gilgo, who described himself as a Kurdish activist.

Macer Gifford, a British citizen who said he had voluntarily joined the YPG to fight the Islamic State, criticized the Obama administration, saying in a Facebook post that it had abandoned “tried and tested allies” and had now “granted the Islamic State a lifeline.”

“This is nothing more than a complete betrayal,” Gifford wrote.

Gen. Joseph Votel, the head of U.S. Central Command, said ­Turkey’s military operation in ­Jarabulus was not surprising. But he indicated that U.S. officials were expecting Turkey and its Syrian rebel allies to target only the Islamic State.

“When they began to focus on something other than ISIL, then I think we had to withdraw our support for that,” Votel told reporters in Washington.

On Tuesday, Turkey denounced what it described as U.S. concessions to “a terrorist group,” referring to the Kurdish forces, and said the Obama administration had damaged relations by “issuing thinly veiled threats against a NATO ally when Russia and Iran silently monitor developments.”

“Having refused to put boots on the ground to stop the bloodshed for years, the Obama administration now wants to prevent Turkey’s decisive move to end the war next door just to save their favorite terrorist organization in the Middle East,” read the scathing editorial in the ­pro-government Daily Sabah newspaper.

Michael M. Gunter, an expert on Kurds at Tennessee Technological University, said Turkey “is much more important than the Kurds” to U.S. interests. But he added that the Kurds would probably continue fighting the Islamic State because they depend so heavily on U.S. support.

“The Kurds have nowhere to go except us,” Gunter said. “Yes, they’ll be mad, they’ll bluster and say, ‘We might not be as good an ally as you want us to be.’ But in the long run, without the United States, the Kurds are hopeless.”

Still, a top Syrian Kurdish official said Washington needs to choose who is the more ­indispensable ally.

“America cannot have the two sides at the same time,” said Sihanouk Dibo, a senior political adviser in the political arm of the YPG.

Other Syrian Kurdish officials said Kurdish fighters would still cross the Euphrates River again whenever it was necessary to protect their allies and supporters.

“We will not wait for Turkey to give us a green light,” said Naasan, the former Syrian Kurdish official. “Every time, they draw red lines and ask us not to go past them.”

On Tuesday, he and other Kurdish officials said they would continue fighting the Islamic State, despite their disappointment in the Americans. In fact, the United States may need to depend on the Kurdish forces even more now, they said.

“America or Europe, they don’t trust Turkey; they know very well Turkey was the gateway for terrorists in and out of Syria,” Naasan said. “They know very well this fight against terrorism won’t be won without the Kurds.”

Sly reported from Beirut. Carol Morello and Missy Ryan in Washington, Loveday Morris in Baghdad and Zakaria Zakaria in Gaziantep, Turkey, contributed to this report.