A sense of a betrayal pervaded the funeral, giving an angry edge to the mourners’ grief. The Kurds were used to the Turks killing their people. It was almost expected. What was different in their attitude to the killing of the 14 men and women buried that hot afternoon in the cemetery at Derik, among 20 fighters killed by Turkish air strikes just three days earlier, was that it had occurred under the watchful auspices of the Syrian Kurds’ big ally: America.

So when a US armoured patrol arrived at the edge of the cemetery in northern Syria, the American troops had been met with sullen stares and silence. I watched Aldar Khalil, one of the most influential advisers with the local Syrian Kurdish administration, approach the US army officer while a cordon of armed YPG fighters surrounded the patrol to keep civilians away.

“I told the American officer how angry people felt,” he told me afterwards, “and advised them that as soon as they had achieved what they wanted to at the funeral they should go. Emotions are high. People expected more.”

The air strikes had been far more significant than anything previously visited by the Turks on the YPG, the Syrian Kurd fighting group that has become the Americans’ primary ally in the forthcoming battle to capture the city of Raqqa from Isis. Operations to shape the battlefield around the militants’ capital are ongoing, and some sections of the front YPG units, the mainstay of the anti-Isis alliance, are now less than four kilometres from the outskirts of Raqqa.

However, the entire operation was thrown into jeopardy early on the morning of 25 April, just days before US officials confirmed that President Donald Trump had authorised the direct supply of weapons to the YPG. Turkish jets repeatedly bombed the YPG’s main command centre on Qarachok Mountain, just above the small town of Derik, destroying ammunition stocks, a communications centre and accommodation blocks. The dead included Mohammed Khalil, a top commander involved in planning the Raqqa operation.

The attack immediately drove a wedge between US troops and the Syrian Kurds, who felt they had been knowingly betrayed by the United States, which had acted as the YPG’s ally in the fight for Raqqa with the one hand while allowing its fellow Nato and coalition member Turkey to stab the YPG in the back with the other.

“There were a couple of days after the Qarachok strikes when several of our leading commanders, and many of our people, put on the pressure to withdraw our forces from the Raqqa front altogether and send them to protect our borders with Turkey,” Khalil, the Syrian Kurd adviser, told me. “They wanted to stop the Raqqa operation. We had to explain very carefully that this was [the Turkish president] Erdogan’s goal, and to persuade them to continue.”

Senior YPG commanders suffered deep personal losses in the Turkish air strikes. Among the mourners at Derik was ­Rojda Felat, a joint commander of the overall Raqqa operation. Standing beside the grave of Jiyan Ahmed, one of her closest friends, she clasped a portrait of the dead woman in her hands.

“She survived fighting Da’esh [Isis] in Kobane, in Tal Hamis and Manbij,” Felat said. “She survived all that, only to be killed by a Turkish jet.”

Later, illustrating the fragile contradictions of the coalition’s alliances, Felat explained that she had gone to sleep in the early hours of 25 April, after finishing a series of late-night planning meetings with British and US officers at the forward headquarters she shares with them on the north side of Lake Assad, Syria’s largest lake, when word of the air strikes came through.

“It was very clear to me that the Americans I was with had not known about the air strikes,” said Felat, 35, a legendary figure among Syria’s Kurds whose role models include Napoleon and the socialist revolutionary Rosa Luxemburg. “They could see how upset and angry I was to learn in an instant that so many friends had been killed, and the Americans dealt with that compassionately. I was extremely distressed, to say the least,” she added, looking away.

Within a few hours of the strikes, Felat was on a US helicopter alongside US officers flown to Qarachok to assess the damage in a very public display of US-YPG solidarity.

The Americans were quick to try to mitigate the damage to their Kurdish allies. A further 250 US troops were sent into Syria to run observation patrols along the Syria-Turkey border in an attempt to de-escalate the tension, bringing the number of US troops there to more than 1,200. In addition, US weapons consignments to the Syrian Kurds increased “manifold” in a matter of days, Felat said.

Yet these measures are unlikely to stop the fallout from a strategy – that of arming the Syrian Kurds – which risks broadening Turkey’s overall conflict with the YPG, unless certain crucial political objectives are attained parallel to the push on Raqqa.

Turkey, at present regarded as a mercurial and mendacious “frenemy” by Western coalition commanders, perceives the YPG as a terrorist organisation that is an extension of its arch-enemy the PKK, a left-wing group demanding greater auton­omy within Turkey. Hence Ankara’s deep concern that the YPG’s growing power in Syria will strengthen the PKK inside Turkey. The Turks would rather their own proxies in Syria – an unattractive hotchpotch of Syrian Islamist groups mistrusted by the West – reaped the rewards for the capture of Raqqa than the YPG.

Although US commanders find the YPG more reliable and militarily effective than the Turkish-backed Islamist groups, the Syrian Kurds are a non-state actor, a definition that ensures B-grade status in the cut and thrust of foreign policy. Nevertheless, recalling the painful lesson of 2003 – that military success is impotent unless it serves a political vision – the US should be devoting energy to imposing conditions on the supply of arms to the YPG as a way of containing Turkish aggression against their ally.

Salient conditions could include the YPG disassociating from the PKK; a cessation in repressing rival political parties in YPG areas; the withdrawal of YPG fighters from northern Iraq, where they are involved in a needless stand-off with Iraqi Kurds; and an agreement by the YPG to withdraw from Raqqa, an Arab city, once it is captured.

As a quid pro quo, and in return for the YPG blood spilled in Raqqa, the Syrian Kurds should have their desire for autonomy supported; have the crippling trade embargo placed on them by the government of Iraqi Kurdistan lifted; and, by means of buffer zones, have their territories protected from further attacks by Turkey and its Islamist proxies.

So far, none of these measures is in play, and comments by US officials have only strengthened a growing suspicion among Syria’s Kurds that they will be discarded by the US the moment the YPG have fulfilled their use and captured Raqqa.

“We have not promised the YPG anything,” Jonathan Cohen, a senior US state department official, told the Middle East Institute in Washington on 17 May – a day after President Erdogan’s visit to the US. “They are in this fight because they want to be in this fight. Our relationship is temporary, transactional and tactical.”

Cohen further said: “We have the YPG because they were the only force on the ground ready to act in the short term. That is where it stops.”

The sense of betrayal felt by the mourners at Derik was perfectly understandable. But Syria’s Kurds should not be so surprised the next time it happens. America, it seems, has promised them nothing more than guns and bullets.

Anthony Loyd is a war correspondent for the Times