Following the rapidly-changing situation in Syria is like trying to unravel a plate of spaghetti. And none of it is good for U.S. influence in the Middle East.

The leaders of Turkey, Russia and Iran concluded an Ankara meeting this week that looks suspiciously like a partial alliance that excludes the United States. The friendly get-together may help explain President Trump’s announced decision this week to pull all U.S. troops out of the diminished fight against ISIS in Syria and leave that fractured key country altogether. Now, comes late word Trump will wait a bit on that.

Tayyip Erdogan, Vladimir Putin and Hassan Rouhani agreed on a partnership to cooperate on building a “lasting ceasefire” in Syria, where years of fighting have seen almost a half-million civilian deaths and millions of refugees flood neighboring countries since anti-regime demonstrations began in Damascus in 2011. The three leaders vowed to “continue their active cooperation on Syria for the achievement of lasting ceasefire between the conflicting parties.”

Even with a scorecard, it’s not easy to make sense of the shifting alliances, deals and double deals. But let’s try:

Turkey is a member of NATO. Erdogan has called for Syrian President Bashir al-Assad to go. The U.S. Air Force flies sorties out of Incirlik there. But Turkey’s just concluded a $2.5 billion deal to buy sophisticated Russian anti-aircraft missiles for protection against someone’s planes. And this month Moscow began constructing Turkey’s first nuclear reactor, a $20 billion deal.

Putin is backing Assad, of course, with Russian troops and planes. In return, he’s obtained access to Russia’s first warm-water naval base on the Mediterranean. The three leaders say they will help start reconstruction of Syrian cities that have been bombed by Russian planes.

Putin is Iran’s top supplier of arms and last year signed a $30-billion energy deal for Russian natural gas. Iran is the world’s largest exporter of terrorism. It has sent possibly as many as 100,000 fighters to back Assad. While there, they receive sophisticated military training from Russians and gain priceless combat experience to use somewhere else someday.

“There is no military solution option for the crisis in Syria,” said President Rouhani, whose troops have prolonged the fighting, “and we need to cooperate to put an end to the war in the country.”

Supporting Assad has put well-equipped Iranian troops with their Hezbollah surrogates on the borders of Israel, which Iran has vowed to exterminate. Trump strongly supports Israel, has increased military sales and may visit next month for the opening of the new U.S. Embassy in Jerusalem.

Trump’s sudden impending withdrawal of about 2,000 U.S. advisers from Syria looks to leave Kurdish forces, once again, at the mercy of larger powers, including Turkey, which sees Kurds as terrorists.

Who will continue the ISIS fight there, so that its militant flames do not spring up again, as they did in Iraq after Pres. Obama’s hasty troop withdrawal?

Turkey shot down a Russian plane a couple of years ago. But now wants to work with Putin to resettle at least some of the 3.5 million Syrian refugees who’ve taken residence in Turkey.

The European Union has paid Turkey to help with the hordes in return for stopping their exodus toward Europe. Opening the refugee spigot would ease Erdogan’s troubles, but the arrival of thousands of poor newcomers, mostly Muslim, would ignite dangerous political tensions in several countries.

‘We are determined to take Syria out of this quagmire,” Erdogan said this week, indicating he’s dropped his Assad opposition. “There will be no peace in Turkey until there is peace in Syria.”

Trump recently hosted Saudi Arabia’s Crown Prince Mohammed bin Salman, an implacable enemy of Tehran, who became the first known Arab leader to say that Israel has a right to live on its land, as do the Palestinians on theirs.

Trump too is an outspoken critic of Iran and this spring will make a crucial final decision likely to pull the United States out of Obama’s Iran nuclear deal and possibly restore economic sanctions. At the moment, European countries, now with billions of new investments in Iran, seem unlikely to go along. And Iran has indicated it will resume its weapons program.

Other than that, the situation is very clear and no problem.