Speaking at the German Marshall Fund, Esper said Turkey’s “unwarranted” invasion into Syria jeopardizes gains made there in recent years as the U.S.-led coalition and allied Syrian Kurdish forces battled the Islamic State group.

“Turkey put us all in a very terrible situation. I think the incursion was unwarranted,” he said. “I think President Erdogan was fixated on making this incursion for one reason or another and there was not a possibility that we were going to start a war with a NATO ally.”

He said Turkey is heading in the wrong direction, spinning closer to Russia, adding, “I think that is unfortunate and I think we all need to work together to strengthen our partnership with Turkey and make sure they trend back to being the strong, reliable ally, responsible ally that they’ve been in the past.”

His comments come on the heels of President Donald Trump’s announcement Wednesday that the U.S. is lifting sanctions on Turkey after the NATO ally agreed to permanently stop fighting Kurdish forces in Syria. And he spoke just a day after he was in Iraq to discuss the withdrawal and the Islamic State threat with Iraqi leaders and his military commanders.

Trump is defending his decision to withdraw about 1,000 American troops from Syria, largely abandoning the Syrian Kurdish fighters who battled IS alongside the U.S. for the last several years. Trump has declared victory, saying the move is saving lives, but it also cedes control of a large swath of the border to Turkey, Russia and the Syrian government.

Trump has agreed that 200 to 300 U.S. troops will remain at the Al Tanf garrison in southern Syria. And Esper has said the U.S. is still discussing a plan that would leave another small residual force in eastern Syria, near oil facilities that are under the control of the SDF. Those troops would help secure the oil from IS.

Esper is expected to meet with Turkey’s defence minister, Hulusi Akar, at the meeting of NATO defence chiefs Thursday. In previous discussions, Esper and other U.S. leaders were unable to convince Turkey to not invade Syria to push back Syrian Kurdish fighters whom Ankara considers terrorists.