As Turkey escalates its cold war with Israel, complete with show trials against top Jerusalem security officials, hopes are fading fast that these two US-allied powers will soon resume their once-flourishing cooperation.

This week, a Turkish court issued indictments against former Israel Defense Force Chief of Staff Gabi Ashkenazi, and three other senior officials involved two years ago in the Mavi Marmara incident.

Ten Turks were killed then after clashing with Israeli SEALs. Now Ankara wants to slap the Israeli military commanders with 10 life sentences each.

Israeli Prime Minister Benjamin Netanyahu vowed to throw the full weight of the state behind Ashkenazi and the others, advising them against setting foot in Turkey.

Not that Turkish Prime Minister Recep Tayyep Erdogan is going out of his way to make Turkey hospitable for them or any other Israeli. Here’s Erdogan yesterday in the Israeli daily Maariv: “We don’t need Israeli tourists.”

The cold war dates back to a 2009 conference in Davos, Switzerland, when the Turkish premier ambushed mild-mannered Israeli President Shimon Peres, publicly calling the Nobel Peace Prize winner a killer.

Since then, Erdogan has sharpened his attacks, scoffing not only at Israeli tourists, but at any other benefit his country might derive from relations with its former closest ally in the region.

Turkey’s secularists, military officials and businessmen are quietly urging him to lower the flames — but Erdogan, his inner circle and kept media instead are pushing a campaign of incitement.

Most recently, the discovery in the Turkish countryside of some dead migrating hummingbirds that had been tagged by Israeli ornithologists led some Turkish farmers to conclude that the birds were Mossad-trained Israeli spies violating the national airspace. In a burst of paranoia, the country’s media ran accusatory headlines, and anti-terror units launched an official investigation — before, finally, exonerating the dead avians.

Since its founding, Israel has based its regional strategy on seeking alliances with nearby non-Arab nations. Relations with Turkey flourished, peaking just as the two countries matured into economic and military powerhouses. Tourism, trade and military cooperation made for the region’s most successful pro-American alliance.

No longer. As he reiterated to Maariv yesterday, Erdogan insists Israel must apologize for the Marmara incident, pay sizable compensation and change its Gaza policies before Turkey will even talk about resumed relations.

Few Israelis are eager to apologize to Ankara for the incident, in which Erdogan’s government egged on an extremist group that tried to break Israel’s Gaza blockade — a blockade meant to help defend Israeli citizens against terrorists. (Turkey, incidentally, kills similar terrorists without mercy.)

Nevertheless, Israeli officials tell me they’ve tried several times to convey official regret over the Marmara incident — only to be rebuffed by Erdogan each time.

Meanwhile, Washington and some Israeli journalists keep leaning on Netanyahu to issue a full-throated apology.

Yet the United Nations (yes that United Nations) has determined that Israel’s blockade of Gaza is legal under international law.This, after UN Secretary-General Ban Ki-moon had convinced Israel to cooperate with a probe that he said would help repair relations between the two countries.

It didn’t. Erdogan rejected the UN conclusions and launched his kangaroo-court proceedings instead.

Once again, good souls will urge Israel to cooperate with the Turkish court for the sake of repairing relations. ButAnkara’s behavior indicates to many in Jerusalem that endless public clashes with Israel are part of Erdogan’s larger, strategic aspirations for leadership of the region and his religion.

Improved Turkish-Israeli relations would advance America’s interests. So instead of more Israeli groveling, perhaps it’s time to try something else: Get President Obama, the one leader who might influence Erdogan, to talk turkey to the man often described as his best friend in the region.