President Trump has scored some very big national security and foreign policy victories by overturning some very bad decisions made by President Obama.

But unfortunately, Trump’s decision to withdraw all U.S. troops from Syria – announced Wednesday – makes the same terrible mistake Obama made in withdrawing U.S. forces from Iraq in 2011.

When Obama pulled all U.S. military forces out of Iraq he created a vacuum that was ultimately filled by fighters for Iran and the ISIS terrorist group. If the Trump administration follows through with an Obama-like withdrawal from Syria, it will be creating a vacuum there that Iran, ISIS, Hezbollah terrorists and Russian forces will fill.

With the U.S. in the same position in Syria today that it was in Iraq in 2011, President Trump needs to reject the Obama policy of total withdrawal. The right policy is to stay smart and tough – not to become Obama 2.0.

The last thing President Trump needs to do is follow the Obama model and pull defeat from the jaws of victory.

Until Wednesday, the Trump administration seemed to be on the right path in Syria. It had smashed the ISIS caliphate and had begun working to prevent Iran and the regime of dictator Bashar Assad from exploiting the U.S. victory over ISIS.

Then suddenly Wednesday morning the news broke that the U.S. military was preparing to withdraw all of its forces from northeast Syria, where they lead anti-ISIS coalition.

President Trump tweeted: “We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency.”

Yet while it may be wounded, ISIS is far from dead. In August, a Pentagon report indicated that there may be as many as 14,000 ISIS fighters remaining in Syria, with comparable numbers in Iraq. Without U.S. troops in Syria, a wounded ISIS can pick up new strength and pose a greater danger in 2019 than it did this year.

Thanks to President Obama, we already know what happens when America rushes for the exits before finishing off its enemies. When Obama pulled the last U.S. troops out of Iraq in 2011 he insisted that the country had become stable and self-sufficient and that the Iraqi military no longer needed support from U.S. troops in the country.

The last thing that President Trump should be doing now is copying the record of abysmal failure of the Obama administration – yet strangely, that is what he will doing if he follows through on his plans to withdraw from Syria.

Obama ignored numerous warnings from American generals and diplomats that the Islamic extremists would return if we left too soon – and Obama turned out to be wrong.

Now we see history repeating itself with President Trump.

After 17 years of fighting in Afghanistan and Iraq, it’s not hard to understand why President Trump is thinking about how to end the war against ISIS, Al Qaeda and their partners. As a candidate, he promised to crush the terrorists and bring the troops home. But he also made clear he wouldn’t repeat the mistake of Obama’s reckless withdrawal from Iraq.

When looking at Syria, it’s important to remember how limited our costs are compared to Iraq or Afghanistan, where the U.S. maintained over 100,000 troops and spent trillions of dollars in the process.

In Syria, the U.S. only has around 2,000 troops and the total cost of fighting ISIS in both Syria and Iraq was under $15 billion from 2014 through 2017. In comparison, the U.S. will spend almost $400 billion this year alone just paying interest on the national debt.

Withdrawing from Syria would also be a gift to Iran and its terrorist proxy, Hezbollah. Whereas President Obama saw Iran as a potential partner, President Trump is determined to bankrupt and isolate the Tehran regime. Trump is right – but pulling out of Syria helps Iran rather than hurts the Islamic Republic.

President Trump’s withdrawal announcement Wednesday was so shocking because he reversed his administration’s policy completely within 48 hours and because he earlier wisely reversed many of President Obama’s biggest mistakes.

Trump pulled the U.S. out of a flawed nuclear deal with Iran that didn’t require tough inspections. He also pulled the U.S. out of the Paris Climate Accord, which gave China a free pass while requiring expensive concessions from the U.S. and Europe.

President Trump pushed Congress to increase the defense budget by tens of billions of dollars, after military readiness declined sharply under President Obama.

Instead of insulting the Israeli prime minister and siding with the Palestinians at the United Nations, President Trump moved the U.S. embassy in Israel from Tel Aviv to Jerusalem and slashed aid to dysfunctional U.N. agencies.

And rather than tolerating North Korea’s missile launches and nuclear tests, President Trump ramped up sanctions until dictator Kim Jong Un felt compelled to negotiate.

President Obama never did any of these things. By doing the opposite of what Obama did internationally, Trump has scored important successes that conservatives have good reason to praise.

In Syria we need the same president Trump who has succeed around the world – not a continuation of the legacy of Obama failures.

If the U.S. pulls out of northeast Syria, Iran would be able to complete its “land bridge” to the Mediterranean. This would enable Iran to accelerate its deliveries of weapons and militia fighters to Assad and Hezbollah.

Already, Hezbollah has a deadly arsenal consisting of about 150,000 rockets, most of them pointed directly at Israel, which borders Syria.

Northeast Syria is also where almost all of the country’s oil fields are located. Right now, Assad can’t touch them, forcing him to rely on illicit shipments from Iran.

Overall, the State Department estimates it has cost Iran $16 billion to keep Assad in power. Every dollar Iran spends on Syria and other foreign adventures is a dollar taken from its own people, who have spent the last year protesting the regime’s incompetence and corruption.

Giving Assad back his oil just frees up money for Tehran to spend at home, which reduces the impact of U.S. sanctions.

Right now, the U.S. has a low-cost strategy in place to keep ISIS down and push Iran out of Syria. That is what success looks like.

The last thing that President Trump should be doing now is copying the record of abysmal failure of the Obama administration – yet strangely, that is what he will doing if he follows through on his plans to withdraw from Syria.

President Trump, the United States and our friends abroad would all be better off if he reconsiders his plan to pull U.S. forces out of Syria and keeps our forces there until we have achieved our objectives and ISIS is truly destroyed.

Andrew Gabel is a research analyst at the Foundation for Defense of Democracies. Follow him on Twitter at @Andrew_B_Gabel.