Two years ago, Ryan Crocker, former US ambassador to Iraq and Afghanistan, declared that Bashar Al Assad would have to be part of Syria’s future or the country would be taken over by jihadists. Last year, Lakhdar Brahimi, the former United Nations and Arab League special envoy, said that Mr Al Assad “has to be part of the discussion and the change that is needed”.

These statements must have been uncomfortable listening for Barack Obama, who had declared in 2011 that Mr Al Assad had to “step aside”. With the Syrian conflict about to enter its fifth year, Washington has recognised that he is not going to quit the scene within any reasonable time frame, and if he did, Damascus would probably fall into the hands of ISIL.

Formally, the White House still wants him out. But it has accepted a Russian peace proposal that calls for talks between the Assad regime and the rebels. This replaces the failed Geneva process, which was an attempt to negotiate a transition of power from the regime to the rebels.

John Kerry, US secretary of state, said it was time for the Syrian president to change his policies to prevent Syria being overwhelmed by terrorist forces. A more forthright reason for accepting the Russian proposal has come from the French foreign minister, Laurent Fabius. He said a political solution would have to include some elements of the regime “because we don’t want to see the pillars of the state fall apart” as happened in Iraq after the US invasion.

The prospect of these talks taking place are dim. But the diplomatic move confirms the clear shift in emphasis of US foreign policy away from removing the Assad regime to stopping the ISIL advance. Since ISIL began chopping off the heads of Americans, the priority has been the terrorist threat posed by jihadists. For the so-called moderate opposition, the Free Syrian Army, it proves that US promises of support for a march on Damascus are empty.

Mr Obama’s reluctance to provide the Free Syrian Army with advanced weapons is a source of tension with US allies, not least Saudi Arabia, which sees the Assad regime as an Iranian pawn that should be removed.

Frustration with America is increased by the Arab countries’ understanding that ISIL did not appear from nowhere but was part of a diversionary tactic by the Assad regime to undermine the credibility of its opponents. The regime released jihadists from Syrian jails, and they were able to make common cause with Iraqi militants who profited from America’s departure from Iraq on a timetable set by US electoral considerations. The regime has now won that trick, with some unwitting help from the Americans.

It is all the more galling that Mr Obama appears to be offering a helping hand to Iran’s ally just as the Iranian economy is in free fall due to sanctions and the low oil price.

Clearly the prospect of a nuclear deal with Iran is at the top of Mr Obama’s priorities, and for that he needs to keep the Russians on side.

This week Russian defence officials, with their arms industry under western sanctions over the Ukraine crisis, have been floating the idea of reviving a suspended sale to Iran of an advanced air defence system.

If this deal went ahead it would change the military balance between Iran and its enemies and deliver a severe blow to Mr Obama’s credibility in handling the Iran dossier. The relationship with Russia must be repaired.

It is no surprise that Washington has different priorities from its regional allies. That has always been the case. The real question is whether the Syrian rebels ever had a chance to prevail over the army. American arming of the rebels would have been met with a Russian response of doing the same to the regime’s forces, leading to an even bloodier stalemate.

At the start of the rebellion, it is just possible that Mr Al Assad could have stepped down in favour of a more consensual figure. But no such person existed. And now, after four bitter years of war, the Alawite minority and the Assad family must stand or fall together. The prospects for regime supporters after a rebel victory are slim indeed.

So what is the way forward? With more than three million having fled Syria and an estimated 7.6 million displaced inside the country, there is a crying need for action to address this humanitarian emergency.

The United Nations has a plan for local ceasefires. This is far from perfect – the effect is likely to be to free up regime forces to concentrate their resources of men and firepower on the beleaguered rebels. But continuing as before is not an option.

Washington finds itself facing two unpalatable belligerents, the regime and ISIL.

Its campaign of bombing, as part of a coalition that includes the Arab states, has stemmed the ISIL advance but made little progress towards Mr Obama’s goal of degrading and ultimately destroying ISIL. That cannot be done from the air and requires significant forces on the ground, which are not currently on offer.

This is not the first time America has faced such a situation: during the 1990s it pursued a policy of “dual containment” to prevent either Iran or Iraq dominating the Gulf region, destroying the fabric of Iraqi society in the process. Washington could repeat the experiment and hold the ring in Syria from the air, but that is not a policy but rather a counsel of despair.

The guiding principle should be simple: ISIL must be destroyed, by a combination of military and political means. Syria must be preserved so that it can once again be a state for all its citizens, however distant that prospect.

If the Al Assad family, for all the guilt they bear for the war, can play a role at this stage of the crisis as part of a long-term transition of power, then so be it. Other options have failed.

Alan Philps is a commentator on global affairs

On Twitter: @aphilps