It wasn’t just liberals who initially thought President Trump’s letter to Turkish President Recep Tayyip Erdogan was the product of some journalistic jokester.

Neither the tone nor the language resembled normal diplomatic correspondence. Lines like “Don’t be a fool!” were blunt to the point of satire. Its repeated use of simplistic phrases like “good deal” (pure Trump-speak), rather than the style that would customarily be used in negotiations with foreign powers, invited the scorn of late-night comedians.

Trump’s heavy-handed threats evoked his Twitter account, not Oval Office diplomacy, and his exhortations aimed at appealing to the better angels of the Turkish autocrat’s nature were plain silly.

But the real problem wasn’t the letter itself — but the absence of a presidential strategy it revealed. Instead of playing a strong hand that would make Erdogan think twice before unleashing an offensive that would lead to atrocities against the Kurds, Trump was merely lashing out frantically, seeking to correct a mistake of his own making. Under the circumstances, it wouldn’t be surprising if, as reports based on leaks from the Turkish government indicated, Erdogan response was to contemptuously toss Trump’s letter in the trash.

Trump loyalists have worked overtime trying to rationalize the president’s decision to give the Turks a green light to launch an offensive in Northern Syria aimed at crushing Kurdish forces. But even if you agree with the president’s desire to pull out American forces from the Middle East and treat the complicated conflicts there as somebody else’s problem, the unfortunate consequences of this move are obvious.

Abandoning the Kurds — who were essential allies to the United States in the battle against ISIS — to the tender mercies of a Turkish regime that seeks their destruction sends a terrible message to both friends and foes in the region. Doing so has the potential to revive ISIS in the void left by the American pullout and the Turkish invasion. That would mean throwing away one of Trump’s undeniable foreign-policy triumphs, since it was on his watch that the so-called caliphate was destroyed after it successfully resisted the Obama administration’s efforts.

The key to understanding Trump’s Mideast strategy has always been his instinctive distrust of ­“experts” and the foreign-policy establishment, a mistrust that comes through loud and clear in the letter.

For decades under both Democratic and Republican presidents, the so-called adults mismanaged the region. They stuck to failed policies like pressuring Israel to resolve the conflict with the Palestinians.

The establishment also faithfully lined up behind President Barack Obama’s disastrous Iran nuclear deal and parroted his media echo chamber’s false arguments that America’s only choice was appeasement or war.

To his credit, Trump, acting on instinct, discarded these failed policies. Contrary to the establishment’s predictions, the world didn’t end. Instead, Trump’s moves — bolstering the alliance with Israel that his predecessor undermined, trashing the Iran deal, re-imposing economic sanctions against Tehran — have rolled back regional baddies.

The president’s desire to disengage from the wars of the Middle East is genuine and popular. But when it comes to Syria, Trump’s instincts have created folly rather than success. Flight from Syria, and his initial green light to the Turks, doesn’t just mean terrible suffering for America’s betrayed Kurdish allies.

Like Obama’s similarly mistaken bugout from Syria and Iraq, rather than ending wars, it will likely force Trump or a successor to intervene again in the future to cope with the mess left behind.

Unfortunately, this time the experts were right. The lack of a coherent Syria strategy is a problem. So are Trump’s contradictory impulses: to get tough with ISIS and Iran while fleeing the region. Trump can choose to do one or the other — but he can’t do both.

There is nothing really wrong with tough talk — even in Trump-speak — addressed to bad actors like the Turks. Erdogan himself isn’t exactly a man of subtle, refined sensibilities. In some ways, he and Trump speak the same language, and that can be an advantage to America, whose foreign policy became too refined for Mideast realities ­under Obama.

But Trump’s belated and almost comic efforts to walk back his unforced error and convince Erdogan not to create havoc in Syria — even if the Turks adhere to the five-day cease-fire Vice President Mike Pence ­announced Thursday — may be too little and too late.

Jonathan S. Tobin is editor-in-chief of JNS.org. Twitter: @JonathanS_Tobin