Great states hate to admit error, so when they have to change course they generally try to disguise the fact. That’s why you may not have heard much about the way that the United States has changed course in Syria in the past three months.

You will recall how Washington insisted for years that it was determined to see the overthrow of Bashar al-Assad, the Syrian dictator, and was at the same time working to destroy his mortal enemy, Islamic State — without, of course, committing any U.S. ground troops to Syria. You may also recall how the U.S. government regularly and vehemently condemned Russia’s military intervention in Syria last year.

Well, that’s all over now. Two weeks ago, U.S. Secretary of State John Kerry and Russian Foreign Minister Sergei Lavrov met in Moscow and agreed to take “concrete steps” together in Syria. These included coordinating airstrikes against both Islamic State and the Nusra Front, the two Islamist offspring of al-Qaida that dominate the rebel forces in Syria.

Russia is the Assad regime’s main ally in the Syrian civil war. By agreeing to these coordinated “concrete steps” against Assad’s main domestic enemies, Washington is effectively conceding that it now wants him to survive. Assad, it has finally recognized, is the lesser evil compared to a takeover of all of Syria by the Islamist fanatics.

It has taken five years to get here. The U.S. bombs Islamic State forces every day, but when Islamic State troops advanced to seize Palmyra last year, no American bombs fell on the vehicles that took Islamic State fighters across the desert to the historic city. That would have been “helping Assad” — and so the U.S. let Palmyra be captured and trashed by the fanatics. (Assad’s troops took Palmyra back last March — with Russian air support.)

The Obama administration fell into this now obviously hopeless strategy back in the days of the “Arab Spring” in 2010-11. Like most people, Obama was convinced that the Assad regime would fall quickly, and that the government that replaced him would be better both for American interests and for the Syrian people. It was, after all, a brutal and corrupt regime. It still is.

As the opposition fell increasingly into the hands of Islamist extremists in 2012-13, the prospect of a peaceful, democratic successor regime vanished. But rather than biting the bullet and switching its support to Assad, the lesser evil, Washington embarked on a forlorn attempt to build a “third force” that would defeat both Assad and the Islamists. It spent billions on the project, but never produced a credible fighting force that could accomplish that miracle.

Governments do not easily admit error, so right down to late last year Washington clung to the illusion that somehow or other it could avoid having to choose between Assad and the Islamists. Now it has accepted that necessity, and the deal with Lavrov clearly signals that the U.S. now wants Assad to survive.

It still won’t say that, of course, but bombing both Islamic State and the Nusra Front means that it will effectively be bombing the great majority of the Syrian rebels. There still are some rebels who aren’t Islamists fighting Assad in the Free Syrian Army, but most elements of the Free Syrian Army have been coerced into joining the Nusra Front in an unequal alliance called the Army of Islam.

The Nusra Front created this alliance specifically to ward off American bombs by wrapping groups that aren’t Islamist around itself. It worked for a while, although Russia was never fooled and has bombed them all without discrimination since it intervened militarily last September. Now the U.S. has signed up to bomb them, too.

The Obama administration has at least learned from its mistakes, and this de facto U.S.-Russian alliance may actually have the power to weaken the Islamist forces drastically and impose a real ceasefire on everybody else. Syria will not be reunited under Assad or anybody else, but at least most of the killing would stop.

Unfortunately, if this approach does not deliver results in the next five months, it is likely to be abandoned. Hillary Clinton seems committed to going back to the old, discredited “third force” strategy if she wins the presidency in November, which would mean years more of killing.

And if Donald Trump wins …

Gwynne Dyer is an independent journalist whose articles are published in 45 countries.