WASHINGTON — Visibly angry at President Donald Trump's decision to remove troops from Syria, U.S. Sen. Lindsey Graham said Wednesday he would be meeting with Secretary of Defense Jim Mattis to "find out what the hell happened" and threatened to pursue more aggressive oversight of the Republican administration's foreign policy decisions.

Fresh off a trip to Kabul where he met with the chief executive of Afghanistan, Graham expressed annoyance that he learned about Trump's decision via Twitter.

In a tweet Wednesday morning Trump said, "We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency."

Those comments came shortly after national news outlets first began reporting word from defense officials that the administration is planning to withdraw all U.S. troops from Syria.

In a follow-up statement, White House press secretary Sarah Huckabee Sanders said the U.S. has defeated ISIS' "territorial caliphate."

"We have started returning United States troops home as we transition to the next phase of this campaign," Sanders said. "The United States and our allies stand ready to re-engage at all levels to defend American interests whenever necessary, and we will continue to work together to deny radical Islamist terrorists territory, funding, support, and any means of infiltrating our borders."

Graham immediately criticized the decision, tweeting that the move would be a "huge Obama-like mistake" — a common refrain from the South Carolina Republican over the past two years any time he tries to convince Trump to change course on international affairs.

"This is a Republican president," Graham later told reporters on Capitol Hill. "I try to work with him and like him, but he can't be immune from oversight. We were pretty aggressive, certainly myself, about Obama's mistakes, and I'm going to be aggressive about what I think are foreign policy decisions that put us at risk."

When the Trump administration decided last year to hold a New York City bombing suspect on criminal charges rather than as an enemy combatant, Graham said, "it is as if President Obama and his team never left." He has also criticized his refusal to punish Saudi Arabia's leadership for allegedly assassinating journalist Jamal Khashoggi. 

For the most part, Graham has become a loyal ally to Trump over the course of his presidency, a reversal from the blistering criticism he directed at then-candidate Trump during the 2016 campaign. 

But he has continued to call out the president publicly at times when he strongly disagrees with him and has particularly sought to persuade him to take on a more hawkish military approach.

While he said he understands Trump has concerns about the costs of ongoing military engagement, Graham argued the U.S. engagement overseas remains "the best defense we have against an attack on the homeland."

"The day we withdraw from Syria puts in motion I think a lot of bad things in the region," Graham said, "and we'll eventually pay for it here."

The U.S. first launched airstrikes against ISIS fighters in Syria in 2014. In the years that followed, the U.S. began partnering with Syrian ground forces to fight the extremists.

Sign up for updates!

Get the latest political news from The Post and Courier in your inbox.

The Pentagon recently said that Islamic State now controls just 1 percent of the territory it originally held.

Just last week, the U.S. special envoy to the anti-ISIS coalition, Brett McGurk, said U.S. troops would remain in Syria even after the Islamic State was driven from its strongholds.

"I think it's fair to say Americans will remain on the ground after the physical defeat of the caliphate, until we have the pieces in place to ensure that that defeat is enduring," McGurk told reporters on Dec. 11. "Nobody is declaring a mission accomplished. Defeating a physical caliphate is one phase of a much longer-term campaign."

And two weeks ago Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said the U.S. still has a long way to go in training local Syrian forces to prevent a resurgence of IS and stabilize the country. He said it will take 35,000 to 40,000 local troops in northeastern Syria to maintain security over the long term, but only about 20 percent of them have been trained.

Trump's national security adviser, John Bolton, said in September that the U.S. would keep a military presence in Syria as long as Iran is active there. "We're not going to leave as long as Iranian troops are outside Iranian borders and that includes Iranian proxies and militias," he said.

The Associated Press contributed to this report.

Follow Jamie Lovegrove on Twitter @jslovegrove.

Jamie Lovegrove is a political reporter covering the South Carolina statehouse and congressional delegation. He previously covered Texas politics in Washington for The Dallas Morning News and in Austin for the Texas Tribune.