During his time in CIA custody, 9/11 mastermind Khalid Sheikh Mohammed told his interrogator something prophetic. The United States may enjoy some fleeting battlefield successes, Mohammed declared, but in the end "we will win because Americans don't realize ... we do not need to defeat you militarily; we only need to fight long enough for you to defeat yourself by quitting."

President Trump should ponder Mohammed's words as he prepares to withdraw U.S. forces from Syria -- a move that will bring a smile to Mohammed's face.

Trump knows the consequences of suddenly withdrawing from a country. The Obama administration "created this huge vacuum" in Iraq in 2011, Trump correctly observed during the presidential debates, adding, "we should have never been in Iraq, but once we were there, we should have never gotten out the way they [did]." Once Trump was inaugurated, he changed former president Barack Obama's restrictive rules of engagement and freed up our military to drive the Islamic State from the territory it had seized. He deserves enormous credit for this achievement.

MARC THIESSEN: DEMOCRATS' NEGOTIATING STRATEGY CAN BE SUMMED UP IN ONE WORD

But just because the Islamic State controls no territory does not mean it is defeated. In 2011, the group controlled no territory in Iraq, yet thanks in no small part to Obama, it soon grew to establish a caliphate the size of Britain. Not only did the Islamic State revive itself, but the resurgent terrorist network also spread its murderous tentacles farther around the globe, establishing cells in 29 countries that have carried out 143 terrorist attacks that have killed 2,043 people and injured many thousands more. We are still living with the deadly consequences of Obama's catastrophic mistake. On Dec. 13, authorities in Bari, Italy, arrested a Somali man named Omar Moshin Ibrahim, believed to be a member of the Islamic State, who was threatening to bomb St. Peter's Basilica in Rome on Christmas Day.

Today, the Islamic State is much stronger than it was when Obama withdrew from Iraq in 2011. The Defense Department estimates that the Islamic State retains about 30,000 fighters in Iraq and Syria and is "more capable" than its predecessor group al-Qaeda in Iraq was at the latter's peak in 2006-2007. By contrast, when Obama pulled our troops out they had only about 700 fighters. According to the Institute for the Study of War, the Islamic State "was able to smuggle as much as $400 million out of Iraq and reinvest it into legitimate businesses across the wider Middle East." With the loss of its caliphate at Trump's hands, the Islamic State has gone back to its roots as a terrorist insurgency. It remains dangerous and well-funded and has global reach.

A U.S. withdrawal from Syria will not only remove the pressure on the Islamic State, it will create a vacuum in Syria that will be filled by the world's worst actors. Al-Qaeda, which has been rebuilding its capabilities while watching the United States weaken its Islamic State rival, will now also have a haven.

Iran and its terrorist proxy, Hezbollah, will establish forward operating bases in southwestern Syria to threaten Israel. Prime Minister Benjamin Netanyahu has declared that Israel will not tolerate this and warned that Israel could retaliate against Iran proper. So, a U.S. withdrawal could precipitate a disastrous regional war.

Turkey will go after the Kurdish fighters we recruited and trained to fight the Islamic State. In Iraq, Obama could at least rationalize that the United States had left behind Iraqi security forces to keep the Islamic State remnants down. If Turkey takes out our Kurdish allies, there will be no one left on the ground in Syria to fight the Islamic State.

Finally, the regime of Syrian President Bashar al-Assad will resume its campaign of atrocities against innocent Syrian men, women and children. If we thought the refugee crisis provoked by Obama's failure to act in Syria was bad, imagine the flood of Syrians seeking refuge in the West if Trump repeats Obama's mistakes.

Trump was right to denounce Obama for declaring victory against the Islamic State and withdrawing U.S. forces. So why is he now doing exactly what he criticized Obama for doing? The president needs to ask himself: Who is celebrating this decision? Answer: Iran, Russia, the Assad regime, Hezbollah, the Islamic State -- and, in his prison cell at Guantanamo Bay, Khalid Sheikh Mohammed.

When your enemies are cheering, you have made a mistake. It's not too late to change course.

CLICK HERE TO READ MORE FROM MARC THIESSEN