President Trump announced in a surprise statement on Wednesday that the United States would be lifting all sanctions imposed on Turkey for its recent ­offensive against Kurdish fighters in northeastern Syria. The president claimed that all conditions had been met to remove the punitive measures and declared the shaky ceasefire between Kurdish forces and Ankara as “permanent.”

The president ­thus relinquished every last bit of ­leverage we had with the Turks.

Turkish strongman Recep Tayyip Erdogan on Wednesday ironed out a deal with his Russian counterpart, Vladimir Putin, to partner in dominating the region and pursuing ethnic cleansing of the Kurds of northern Syria — many of whom fought with the Western coalition against ISIS.

The crisis began last week when Trump agreed hastily in a phone conversation with Erdogan to remove all US troops from the region. When it became clear that Erdogan viewed this as a green light — a term the White House rejects — the US Treasury imposed sanctions on the Turkish defense and energy ministries and three of the country’s senior officials. The White House made it clear that more penalties could come if Ankara did not restrain its military.

With tensions running high, Vice President Mike Pence visited Ankara and won a five-day ceasefire agreement with Erdogan. Yet sporadic clashes between Turkish and Kurdish forces continued. Then, on Wednesday, Erdogan traveled to Sochi where he met with Putin. The two agreed to remove Kurdish militants from a large swath of the border over the next week. In the process, America was edged out of determining the future of region; Putin emerged the clear winner.

The president now says he will lift sanctions on Turkey “unless something happens that we’re not happy with.” This implies that the president is somehow fine with the current situation — Turkish military operations against our Kurdish partners and Putin snatching up key real estate in the Middle East. At minimum, the removal of sanctions deprives America of much-needed leverage to ensure that Turkey behaves like an ally.

The truth is that Turkey has not acted like an American ally for quite some time. Erdogan’s regime played a crucial role in a massive sanctions-busting scheme that helped Iran pocket $20 billion in cash and gold between 2012 and 2015.

Ankara refuses to acknowledge its role, despite the fact that a Turkish banker was found guilty in a New York court in 2018. In fact, after serving out his sentence, Mehmet Hakan Atilla was recently tapped to head the Istanbul Stock Exchange — a clear finger in Trump’s eye. Yet the president doesn’t seem terribly concerned.

Nor does the president seem bothered by the fact that Turkey serves as a key facilitator for the Palestinian terrorist group Hamas. The US Treasury has been sanctioning the terrorist group all over the Middle East, including in Turkey. But Erdogan has done nothing to halt this activity. Again, the president doesn’t seem terribly concerned.

Erdogan has also defied Washington in purchasing the S-400 missile-defense system from Russia this year, even after US officials warned that doing so would trigger sanctions. It was an odd move for a NATO ally, to put it mildly.

Erdogan’s ambitions in arming Turkey go beyond just the S-400, though. He went on the record last month declaring Turkey’s desire to join the ranks of states that possessed nuclear weapons.

As Trump knows well, sanctions are one of the most effective and powerful tools the United States possesses. The Turks got a taste of them last year, when Trump imposed sanctions on top Turkish officials when they held American pastor Andrew Brunson on false charges. The Turks soon relented.

The sanctions imposed on Oct. 14 were arguably Vice President Pence’s best leverage in the ceasefire negotiations last week in Turkey. And they would be our best leverage now to ­ensure that the Turks bring their foray into Syria to a swift conclusion.

Thankfully, this decision is ­reversible. The president can re-impose sanctions at his discretion. And Congress appears to have teed up a package of its own. If he doesn’t take action on his own, Trump should at the very least stand aside for Congress, much as he did for the Turks when they invaded Syria.

Jonathan Schanzer is senior vice president at Foundation for Defense of Democracies. Twitter: @JSchanzer