The president responded to assertions Tuesday by intelligence leaders and Senate Republican leader Mitch McConnell that more works needs to be done before U.S. troops leave Syria.
Trump has been at odds with military and intelligence leaders since last month, when he made a surprise announcement that the United States would entirely leave Syria because IS militants had been defeated. Defense Secretary Jim Mattis resigned the day following the announcement while others raised concerns about the safety of Kurdish allies once the United States is gone.
"When I became President, ISIS was out of control in Syria & running rampant. Since then tremendous progress made, especially over last five weeks," Trump tweeted, referring to the group by one of its acronyms. "Caliphate will soon be destroyed, unthinkable two years ago."
Trump has also expressed willingness to withdraw from Afghanistan, where U.S. forces have been present since 2001.
"Negotiations are proceeding well in Afghanistan after 18 years of fighting. Fighting continues but the people of Afghanistan want peace in this never ending war. We will soon see if talks will be successful?" Trump said.
Tuesday, Director of National Intelligence Dan Coats and CIA Director Gina Haspel told Congress that while progress has been made against Islamic State fighters, alleviating pressure on the terrorists could allow them to regroup.
"ISIS will continue to be a threat to the United States, and we're going to have to continue to keep our eyes on that," Coats said. "This terrorism threat is going to continue for some time."
McConnell has proposed a bipartisan bill, the "Strengthening America's Security in the Middle East Act," which formally warns the administration against withdrawing prematurely from Syria or Afghanistan. It calls for diplomatic engagement and political solutions to underlying problems in both countries.
"While it is tempting to retreat to the comfort and security of our own shores, there is still a great deal of work to be done," McConnell said. "We know that left untended, these conflicts will reverberate in our own cities."
U.S. intelligence agrees with McConnell. A 2017 analysis said a premature exit in Afghanistan would be likely to invite a terrorist attack in the United States within two years.
McConnell's bill requires a two-thirds majority to pass in Congress and could be vetoed by Trump.
Kurdish leader and Syrian Democratic Council President Ilham Ahmed visited Washington, D.C., this week to make a case for the United States to remain in Syria longer.
"We are asking the Trump administration to slow down the withdrawal and instead implement a well-studied plan," Ahmed told The National.
The fear is that Turkey could exploit the power vacuum left by the United States and attack Kurdish forces, which Ankara considers terrorist. Turkish President Tayyip Erdogan said he supports the U.S. withdrawal. In a phone call Sunday, Trump warned Erdogan Turkey would face sanctions if it attacks Kurdish forces.
Kurdish officials have said they're open to United Nations oversight in the conflict, as long as Turkey isn't involved. The Syrian Democratic Council said it opposes a 32 kilometer "safe zone" because it's a Turkish idea.
In a later tweet Wednesday, Trump criticized intelligence officials as "passive" and "naive" on another threat -- Iran.
"When I became President, Iran was making trouble all over the Middle East, and beyond. Since ending the terrible Iran Nuclear Deal, they are MUCH different, but a source of potential danger and conflict," he wrote.
Trump also said U.S. sanctions are draining Iran's economy and are the only thing holding them back.
"Be careful of Iran. Perhaps Intelligence should go back to school," he said.