It all happened very fast, in the end. On Monday Russian President Vladimir Putin was at the United Nations in New York saying that the United States was making “an enormous mistake” in not backing Syria’s President Bashar al-Assad in his war against Islamist rebels, notably including “Islamic State” (or ISIS, as it used to be known).

On Tuesday the upper chamber of the Russian parliament unanimously voted to let President Putin use military force in Syria to fight “terrorism,” in response to a request from the Syrian government.

And on Wednesday morning the Russian warplanes started bombing rebel targets in Syria. Moscow gave the US embassy in Iraq one hour’s notice, requesting that US and “coalition” warplanes (which are also bombing Islamic State targets in Syria) to avoid the airspace where the Russian bombers were in action.

And Donald Trump, bless his heart, said “You know, Russia wants to get ISIS, right? We want to get ISIS. Russia is in Syria — maybe we should let them do it? Let them do it.”

And for once, Trump is right. Even a stopped clock is right twice a day.

If you want to stop ISIS, you have to do it with troops, and the only ground troops fighting ISIS in Syria are the Syrian army and the Kurds along the northern border with Turkey. But the US has been duped by Turkey into betraying the Kurds, and it will not use its airpower to help the Syrian army, which is now on the ropes.

That’s why Palmyra fell to Islamic State forces in May. Despite all the other American airstrikes against ISIS forces in Syria, it made not one to help the Syrian forces when they were desperately defending the historic city, and so they eventually had to retreat. It was more important to Washington not to be seen helping Assad than to save the city.

This is a fine moral position, as Assad’s regime is a deeply unattractive dictatorship. Indeed, the great majority of the 4 million Syrians who have fled the country were fleeing the regime’s violence, not that of ISIS. But if you don’t want the Islamist extremists to take over the country (and maybe Lebanon and Jordan as well), and you’re not willing to put troops on the ground yourself, who else would you help?

Washington’s fantasy solution to this problem has been to create a ‘third force’ of rebels who will somehow defeat the Islamic State while diplomacy somehow removes Assad. But the other big rebel organizations in Syria, al-Nusra and Ahrar al-Sham, are also Islamists, little different from ISIS in their ideology and goals. In fact al-Nusra is a breakaway faction of ISIS, now affiliated with al-Qaeda. (Remember al-Qaeda? Chaps who did the 9/11 attacks?)

If Assad goes down, it is Islamic State, al-Nusra and Ahrar al-Sham who will take over Syria, not the pathetic little band of fighters being trained by the United States in Turkey. In fact the first group of them to cross back into Syria were immediately annihilated by ISIS, who had probably been tipped off by America’s not very loyal ally, the Turkish government.

Putin does not make the same meaningless distinctions between Islamic State and the other Islamist groups that the United States insists on. The first Russian air strikes were on territory held by al-Nusra, not Islamic State. But the Russians will hit ISIS too. In fact, the first big operation will probably be an attack by a re-equipped Syrian army to retake Palmyra, heavily backed by Russian air power.

Whether Putin’s intervention will be enough to save Assad remains to be seen. The carping comments in the Western media about how he wants to distract attention from Russia’s involvement in the Ukrainian civil war and restore Russia’s position as a great power are true enough — indeed, he is probably shutting down the fighting in Ukraine mainly to clear the decks for Syria — but that is not his primary motive.

He is just doing what needs to be done.

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