The liberation of Raqqa, Syria, the Islamic State's final stronghold, has severely weakened the group as a military threat. But as its members slink off the battlefield to melt into local populations or infiltrate nations in Europe, Africa and around the world, they leave a region in ruins and an almost impossible challenge for the United States.
Over four gruesome years, ISIS swallowed up large areas of Iraq and Syria, taking control of oil fields and using beheadings, rapes and other cruelties to terrorize populations. Now, the degradation of the group has allowed Iran, Russia and others to scramble for advantage. The anti-ISIS coalition is fracturing, reviving divisions and creating conditions that could allow the extremists to regroup. And American leaders seem to have no clear plan to manage this instability or to capitalize on their military success.
One big concern is the semiautonomous region of Kurdistan, which until recently was Iraq's anchor. Today its future, and that of a unified Iraq, is in doubt. That's because of an independence referendum in September that was pushed through by Masoud Barzani, then the Kurdish leader, despite warnings from Iraq's central government, Turkey, Iran and the United States -- the Kurds' main ally -- that the vote could lead to Iraq's dissolution, undermine the anti-ISIS fight and widen divisions even among Kurdish factions.
Since the referendum, which won overwhelming support from voters, Iraqi forces took control of Kirkuk, an oil-rich Iraqi city that Mr. Barzani -- taking advantage of the threat of ISIS at the time -- had Kurdish military forces seize in 2014. Iraq is also reportedly moving to take control of Kurdistan's border crossings with Syria and Turkey from Kurdish forces armed and trained by Washington. Mr. Barzani has been forced from power.
Secretary of State Rex Tillerson visited Baghdad last month to urge the Kurds -- who have been among the most capable foes of ISIS -- and the central government to settle their differences. After that, the Kurds announced plans to suspend the independence drive and enter talks. Calming Iraq-Kurds tensions and resolving longstanding grievances, like finding a fair formula for sharing oil profits, while maintaining Kurdistan's standing as a semiautonomous region should be an American priority. All these steps are necessary for regional stability.
Meanwhile, Iran and Russia have expanded their regional influence. Both Iran and Iraq have Shiite majorities, and after the Americans overthrew Saddam Hussein, under whom the Sunni minority held sway in Iraq, Iran cultivated close ties with its neighbor. Iran now exercises leverage there in part by training and arming militias allied with the government in battling ISIS. In Syria, Iran has also provided troops and arms that, along with Russian jet fighters, have kept President Bashar al-Assad in power and helped advance Tehran's goal of establishing a corridor linking Iran's Hezbollah allies in Lebanon with Damascus. In fact, Syrian forces are in a race against the United States and its allies to take control of remaining ISIS pockets to strengthen their hand in negotiations over a future Syrian political settlement.
When the fighting is done, there is no practical way short of war to force Russia and Iran to leave Syria entirely. But the United States should explore ways to negotiate limits on the two countries' roles in postwar Syria.
Another major challenge is an old one: persuading Iraq's Shiite-led government to integrate the Sunni minority into the governing structure so that Sunnis have a stake in the country's future. Chronic mistreatment of the Sunnis afforded ISIS, a Sunni group, a fertile ground for recruits.
Given Mr. Trump's America First vision, it is unclear how he will respond to such complex challenges. His distaste for nation building, with its implication of a long-term commitment, is understandable. The United States has tried nation building in Iraq, Afghanistan and other places with little success and should not assume the main burden now. But leaving Iraq and Syria without a recovery plan -- one that encompasses reconstruction, security and improved governance -- will create conditions for ISIS's return.
Those conditions will be worse if a political solution to Syria's civil war doesn't ensure Mr. Assad's eventual departure. That is an outcome Russia and America tried to orchestrate before and should try again. Russia and Iran, pro-Assad allies who inflicted much of the destruction on Syria, must assume a major responsibility for the rebuilding. Other partners, like the European Union, are also needed.
Having decimated ISIS, the United States and its partners in the anti-ISIS campaign must turn to finding and constraining the militants who have dispersed from their failed caliphate and persuading the Mideast's overwhelmingly youthful population that the future lies not with extremists but with people who free them to dream and achieve.