Sen. John Cornyn (R-Texas) defended President Donald Trump’s widely condemned decision to withdraw American troops from northern Syria, claiming it was an appropriate move if Turkey was “trying to ethnically cleanse” U.S.-allied Kurdish forces in the region.

“If Turkey was planning on coming into northern Syria and trying to ethnically cleanse the Kurds, and U.S. troops were caught in the middle, I am not completely convinced that it was a bad idea to get them out of harm’s way,” Cornyn told reporters Wednesday, reported The Dallas Morning News.

He added, however, that he wishes there had been “more consultation with Congress and others and our allies in the region.”

The Republican lawmaker’s comments came just hours after Trump announced he was lifting sanctions against Turkey, which agreed to a cease-fire against the Kurds in northeast Syria. Trump took credit for the deal, though Democrats and some Republicans say his decision to upend American foreign policy in the region enabled Turkey to launch a military offensive against the Kurds earlier this month.

Fighting between Turkey and the Kurdish-led Syrian Democratic Forces, the main U.S. ally in the fight against the self-declared Islamic State in Syria, has resulted in the deaths of dozens of people and the displacement of thousands more.

During the fighting, Turkish-backed Arab fighters killed Hevrin Khalaf, the head of a Kurdish political party. A militant group posted a gruesome video of her execution online.

Foreign policy experts warned Trump’s decision to essentially abandon the Kurds could lead to their genocide by Turkey, which considers them to be terrorist insurgents. The House overwhelmingly passed a resolution last week to condemn the president’s move.

But Trump patted himself on the back Wednesday, claiming the U.S. and “nobody else” was responsible for avoiding all-out war in northern Syria.

“We have done them a great service and we’ve done a great job for all of them,” Trump said of Turkey, Syria and the Kurds. “And now, we’re getting out. ... Let someone else fight over this long-bloodstained sand.”

Cornyn told reporters Wednesday that things need to “play out a little bit” before he could say whether he felt Trump’s decision to lift sanctions was the right move.

Asked Thursday about his “ethnically cleanse” remark, Cornyn appeared to walk it back some.

“I wasn’t very clear,” he told HuffPost. “If the U.S. isn’t committed to stay in Syria, getting our troops out of harm’s way where they might be injured or killed during the inevitable conflict between the Turks and the Kurds was something I was concerned about.”

Igor Bobic contributed reporting.