Read: In Iraq, the U.S. gets hit where it hurts

"I’m convinced that he hasn’t made any pronouncements about getting out of Iraq because he knows full well that ISIS can reemerge. They have a presence there,” Jack Keane, a retired general and informal adviser to the president on national-security matters, told me. “And he understands that if we unilaterally pulled out and this thing caught on fire again, he would own it in a way that Obama owned it after he withdrew.” Trump, he said, is sensitive to what happened when his predecessor left Iraq and ISIS rose from the remnants of the war many Americans had thought was over.

Trump himself made this clear on the campaign trail in 2016, despite also lamenting the U.S. going into Iraq at all. Obama withdrew troops from Iraq in 2011, unable to secure a new agreement with the Iraqi government to keep them there longer. Iraq was forced to invite the U.S. military back to fight ISIS, which in the summer of 2014 was threatening genocide against the Yazidis and beheading hostages, including Americans.

By 2016, Trump was convinced of two things: ISIS was Obama’s fault, and the U.S. had to stay in Iraq to fight it. Iraq was now the “Harvard for terrorism,” he said. That left no choice but to “take care of it.”

And so once Trump took office, he sped up the military campaign against ISIS and notched a major victory with the fall of the Islamic State’s Iraqi capital in 2017. In the spring of 2019, he declared the territorial defeat of ISIS, and later that year, ISIS’s leader, Abu Bakr al-Baghdadi, killed himself during a U.S. Special Operations raid.

But Trump, despite his private and public complaints about the expense, did not promise to withdraw from Iraq, the central staging ground for the U.S. counter-ISIS fight. Instead, he has focused on getting troops out of Syria, where a complex battlefield currently includes some 500 U.S. troops butting up against the competing interests of Turkey, a NATO ally; U.S. adversaries such as Russia, the Syrian government, and Iran; and ISIS remnants.

Furthermore, Keane said, “it’s the U.S. military leaders in Iraq that actually run the U.S. coalition war against ISIS in Syria, so we're managing Syria and Iraq from Iraq.” Put another way, the U.S. could still fight ISIS without Syria; it could not fight ISIS without Iraq.

So the first time he was ready to declare victory against ISIS, back in December 2018, when the group was still clinging to its last scraps of territory, Trump may have spotted a double political benefit: He could announce what looked like a big troop withdrawal and claim to end the war in one country, while also vowing to keep ISIS down. Thus, when he took a hastily organized trip to Iraq that month, he started talking about bringing troops home—from Syria. He toured the massive al-Asad Air Base, in western Iraq—a “fantastic edifice,” he later called it—and marveled at the size of its runways. Then he told the troops there that they would stay put “to prevent an ISIS resurgence and to protect U.S. interests.”