The Islamic State caliphate is crumbling, but President Trump is right to keep some military forces in Syria.

Speaking on Thursday, Defense Secretary Jim Mattis explained that the U.S. would retain forces there to help peace efforts and keep a lid on any threats that emerge in the post-ISIS era. As Mattis put it, "We're trying to move everything out of Astana over to Geneva, so we can come up with the next steps. Those next steps will have to do with how do you set up a political reconciliation. That plan would involve an election of some kind, under international observers."

"Astana to Geneva" is shorthand for the two different peace processes underway for Syria. The Astana process is led by Russia and Turkey but excludes Kurdish and other groups opposed to Syrian President Bashar Assad's regime. The Geneva process is led by the United Nations and would include all parties except for ISIS, al Qaeda, and Salafi jihadist groups.

Geneva's inclusiveness is crucial in offering a political forum to address all grievances at play in Syria. It offers the best chance of avoiding what happened after former President Barack Obama withdrew U.S. forces from Iraq in 2011. Then, the absence of American influence allowed Prime Minister Nouri al-Maliki to suppress Iraq's Sunni population and drive them into arms of ISIS.

Assad, Iran, Russia, and their allies would have no qualms about turning Syrian Sunnis and Kurds into dust. They have already killed hundreds of thousands.

Fortunately, Assad knows at the moment that he must go through the U.S. military in order to achieve his ambitions. Secretary Mattis recognizes that an inclusive peace process is the only manner in which "we would be in a position then to only come down when that plan has traction, if there's something going forward, rather than walking out and then looking over our shoulders at all hell breaking loose again. We've got to make certain we turn this over in a responsible way."

So while lengthy military occupation and meddling with Mideast regimes is and should be a matter of grave concern, Mattis is deploying American strength prudently. The plan here doesn't involve remaking Syria into a democracy. It's about ensuring Assad's aggression is restrained and cannot incubate ISIS 2.0.

It's also about countering Iranian influence in Syria, which has been increasingly bold in recent weeks. Iran has seized territory from the Kurds in northern Syria and from Sunni tribes in central Syria and Iraq. Sensing Assad's rising fortunes, Iran believes the time is right to establish a contiguous supply line between Tehran and Hezbollah's southern Lebanese strongholds bordering Israel.

It won't be food and medicine that travels along this route, but missiles, misery, and regional destabilization. An American military presence is a deterrent against Iran's grand ambitions. It works and can make war less likely.

Over the past year, as Iranian militia proxies have repeatedly threatened American bases in Syria, Trump has authorized the use of force against them. Iran has understood this blunt message and restrained its threats accordingly.

Ultimately, the U.S. ground presence in Syria forces Assad and his allies to recognize that they cannot, by themselves, decide what happens next. By staking an American flag in the ground, the U.S. lends credibility and power to those whom Assad would otherwise turn into terrorists. In a direct, if ironic, sense this strategy offers the greatest potential for lasting peace and American security.