The Middle East today is enduring a replay of World War II — with the Islamic State in the role of Nazi Germany.

Having seized much of Europe and parts of the Soviet Union, Nazi Germany reached the peak of its expansion by the fall of 1942. Then, stopped at Stalingrad and unable to overwhelm Britain, the Nazis began to fall back, and the war turned into a race between the Soviet troops marching from the east and the Allied soldiers surging from the west. After the war, as a result of the competition between these two sets of armed forces, Europe would remain divided for the next half century.

The Islamic State likewise reached its peak expansion in mid-2014 when it controlled large chunks of Iraq and Syria. It has experienced a rise and fall even more precipitous than the Nazis’. By mid-2016, a mere two years later, it had already lost 45 percent of its territory in Syria and 20 percent of its territory in Iraq.

Today, with the fall of Mosul in Iraq and Raqqa in Syria, the Islamic State has dwindled to a swath of land around the border of the two countries. Once a “state” of 11 million people with an economy worth about $1 billion a year — the size of Great Britain, the population of Greece, the economic output of Gambia — ISIS is now little more than the several thousand fighters desperately fending off attacks from all sides. From the west, the Syrian government of Bashar al-Assad is attempting to retake as much of Syria as it can. From the east, Iraqi forces and Kurdish peshmerga operating under the cover of U.S. air support have been steadily ejecting the would-be caliphate from Iraqi territory.

In both Iraq and Syria, significant divisions exist among the anti-ISIS fighters. Indeed, the lands encompassing Iraq and Syria would be lucky to experience the frozen hatreds of a Cold War in the wake of the fall of the house of ISIS. The shrinking of the caliphate will more likely lead to a new level of fighting — over the future structure of both Iraq and Syria and, more ominously, the dispensation of the region as a whole.

In Syria

It not only feels like 1945 in Syria, it looks that way as well. After months of saturation bombing, the cities that ISIS once controlled look like Germany after it had been reduced to rubble in the final months of World War II, as the Allies and the Soviets tightened their vise grip on the Nazis.

Thanks to the help of both Russia and Iran and to its ruthless aerial campaign, the Syrian government has managed to regain 60 percent of the country. Syrian forces have continuously bombed civilian targets, such as hospitals. Of the 1,373 attacks on civilian infrastructure in 2016, for instance, Syrian and Russian forces were responsible for 1,198. Last month, September, registered the largest number of casualties for 2017, with nearly 1,000 civilians killed, including over 200 children, according to the UK-based Syrian Observatory for Human Rights. The Assad regime has specialized in the comparatively low-tech barrel bombs, which maximize civilian casualties, dropping nearly 13,000 of them in 2016.

The U.S.-led coalition, meanwhile, has been equally brutal in its effort to dislodge the Islamic State from its capital of Raqqa. The city now looks like Dresden after the firebombing of World War II, as the Russian government has rightly pointed out. According to Syrian activists, over 1,000 civilians died in the bombing.

The third leg of brutality in Syria is Sunni extremism. True, ISIS is on the decline. But other militant forces aspire to kick Assad aside, keep the Kurds down, and beat back the Americans, Russians, and Iranians. After several name changes, the latest collection of al-Qaeda-like factions in Syria — which may or may not maintain a link to al-Qaeda itself — is the Levant Liberation Committee (Tahrir al-Sham or HTS). With its ISIS rival shrinking daily, HTS could emerge as the insurgency of choice for those who hate Assad as well as anything associated with the Americans.

Large tracts of ISIS territory in Syria were thinly populated desert, but the caliphate possessed some jewels in their crown. This weekend, on the heels of the liberation of Raqqa, U.S.-backed militias took over the Islamic State’s largest oil field. Syrian government forces were reportedly within a few miles of the strategic asset, but were pushed back by ISIS fighters. The Syrian Democratic Forces that took over the Omar oil field are led by Kurds, but some of the soldiers are also Arab. Although the SDF as a whole is putatively fighting for a secular democratic Syria, the Kurds are more pragmatically trying to gain leverage to safeguard their gains in the north where they have established the de facto autonomous region of Rojava.

Hatred of ISIS has been the lowest common denominator for a broad range of actors in Syria, from American neocons and Syrian generals to Kurdish militias and al-Qaeda sympathizers to Kremlin geopoliticians and Hezbollah. ISIS has been a knife stuck deep into Syria. There’s no argument that the knife is life threatening. But remove it, and Syria risks bleeding out.

In Iraq

On his recent swing through the Persian Gulf, where he failed to get Qatar and Saudi Arabia to kiss and make up, Secretary of State Rex Tillerson also made some especially ill-conceived comments about Iraq.

“Iranian militias that are in Iraq, now that the fight against Daesh and ISIS is coming to a close, those militias need to go home,” he said.

There aren’t any Iranian militias in Iraq. The Popular Mobilization Forces that have played a major role in pushing the Islamic State out of Iraq are largely Shiite, but they also contain Sunnis and Christians. Many of the brigades in this coalition force have links to Iran, but at least one major unit so far has been incorporated into the Iraqi army. In other words, the so-called “Iranian militias” are already home. They’re Iraqis, after all.

Tillerson also said, “Any foreign fighters in Iraq need to go home, and allow the Iraqi people to rebuild their lives with the help of their neighbors.” Was Tillerson announcing that all U.S. soldiers currently in Iraq — 5,262 according to the Pentagon, but possibly as high as 7,000 — are about to go home? If so, everyone in the media and the U.S. government seems to have missed this second “mission accomplished” announcement.

Thanks largely to the United States and its earlier decision to invade and occupy the country, Iraq faces the same kind of fragmentation problem as Syria. Iraqis have divided loyalties. Now that the acute threat of ISIS has passed, the fissures in Iraqi society are once again widening.

Consider the ongoing conflict between Kurdistan and the central government in Baghdad. The residents of the autonomous Kurdish region in northern Iraq went to the polls last month and overwhelmingly endorsed independence. The central government immediately went on the offensive, putting economic pressure on the wayward province and sending army units to seize the disputed oil-rich region around the city of Kirkuk. With ISIS on the decline, anti-Kurdish sentiment can unite the rest of Iraq. As Juan Cole points out, the Kurdish move brought out Iraqi nationalism even in the Shiite militias that helped the Iraqi army retake Kirkuk.

In retrospect, Kurdistan President Mahmoud Barzani’s bid to use the independence referendum to boost his own political fortunes was, according to veteran Kurdish politician Mahmoud Osman, a “miscalculation.” It may revive Iraqi nationalism and thwart Kurdish aspirations. Or it could trigger more centrifugal forces. With ISIS on its way out and the U.S. military presence relatively modest, Iraqis may well turn back to their post-invasion preoccupation of fighting each other to the point of the country’s dissolution.

After ISIS

The war against ISIS is like a matryoshka “nesting doll” from hell. The campaign against the caliphate is inset in the larger Syrian civil war and the Iraqi federal conflict. These are in turn nested within a larger confrontation between Iran and Saudi Arabia. And this regional tug-of-war is itself part of an even larger competition for influence between the United States and Russia.

Now, imagine giving this matryoshka doll to a six-year-old child prone to tantrums. Enter Donald Trump. He has done just about everything he can to make a bad situation worse short of destroying the doll with nuclear weapons. He has antagonized the Iranians at every turn, encouraged the worst tendencies of the Saudis, done little to keep Iraq together, made no effort to push the warring sides in Syria back to the negotiating table, and pursued a woefully inconsistent policy toward Russia.

Yes, the looming defeat of ISIS is to be cheered, but the costs have been huge. There’s the enormous loss of civilian life and the destruction of ancient cities. There’s the uptick in ISIS attacks abroad. Iraq remains fragile, though the Kurds have offered to freeze their independence vote. Syria is no closer to an end to its civil war, though more rounds of peace talks are set to begin shortly. Human rights violations by the Assad government continue, though the first trials have taken place in Europe to hold those responsible for those violations.

Most importantly, no one is tackling the nested conflicts in the region. The first step is to take the matryoshka doll out of Donald Trump’s hands. Give him something else to play with, perhaps another tour of his favorite campaign stops in the United States. Then let some real adults — the UN, the EU, Jimmy Carter? — grapple with the post-ISIS realities of the Middle East.