Israel's founders had high hopes that the Jewish state, isolated in a sea of Arab hostility, could align itself informally with Iran and Turkey - Muslim countries which had their own differences with the Arabs. Sure enough, for years Israel obtained much of its oil from the shah, and our unofficial embassy in Teheran was second in personnel only to our Washington representation. Turkey, in 1949, became the first Muslim state to recognize Israel. David Ben-Gurion made a secret trip there in 1958, but it was not until 1999 that an Israeli premier, Ehud Barak, visited openly. Defying the Arab League, Turkey signed a military cooperation pact with Israel in 1996. In 2002, Turkey's Islamically-inclined Justice and Development Party (AKP), under the leadership of Recep Tayyip Erdogan, won a landslide victory. Keen to pursue EU membership (Turkey is a candidate member), Erdogan said his party would maintain Ankara's ties with Israel. It has; but the approach, under the AKP, has turned decidedly tepid. During the 2000-2005 Palestinian uprising, for instance, Erdogan nixed a proposed water deal and temporarily recalled his ambassador to Israel. After Hamas won the 2006 Palestinian elections, Turkey broke with Western policy and received Hamas leader Khaled Mashaal. Having mended its relations with Damascus, Turkey protested the 2007 IAF raid on the Syrian nuclear facility and Israel's alleged overflight of Turkish territory. And last year, Turkey hosted Iranian President Mahmoud Ahmadinejad in Istanbul. Ankara and Teheran now have close political and economic ties. Despite Turkey's evident drift away from the Western camp, the Olmert government nevertheless accepted Ankara's offer to serve as a go-between in peace talks with Damascus. SINCE THE IDF began hitting back at Hamas in Operation Cast Lead, both the government and people of Turkey have lined up behind the Islamists. Thousands rallied outside the Israeli consulate in Istanbul on Saturday; 200,000 demonstrated in a main Istanbul square on Sunday. There were also big "Down with Israel" rallies in Ankara, Diyarbakir province, Trabzon, Adana, Bursa and Sirnak. Erdogan has been trying to halt the IDF's operation to deter Hamas violence virtually since the mission began 11 days ago. He ostentatiously avoided Israel in a just-concluded fact-finding mission that took him to Saudi Arabia, Egypt, Jordan and Syria. Now he has "found" that Israel is conducting "inhuman acts" in Gaza, which, he says, will cause Israel to destroy itself. He believes that, in time, Allah will punish those who violate the rights of the "innocent." The human tragedy in Gaza, it transpires, is entirely Israel's fault: "Hamas abided by the truce. But Israel failed to lift embargoes. In Gaza, people seem to live in an open prison. In fact, all Palestine looks like an open prisonâ€¦" Turkish President Abdullah Gul adds: "What Israel has done is nothing but atrocity." Erdogan can find absolutely nothing wrong with anything Hamas has done since it grabbed power in Gaza. Turkey has just taken its seat as a non-permanent member of the Security Council and Ankara pledges to be Hamas's conduit to the United Nations. It has offered to deliver Hamas's conditions for a cease-fire to the council. Erdogan is also pushing to bring Fatah and Hamas together, though such reconciliation is unlikely to produce a less intransigent Palestinian polity, or one committed to coexistence with Israel. On balance, we're not convinced that Turkey has earned the right to lecture Israelis about human rights. While world attention focuses on Gaza, Turkish jets have bombed Kurdish positions in northern Iraq. Over the years, tens of thousands of people have been killed as the radical PKK pursues its campaign for autonomy from Turkey. Kurdish civilians in Iraq complain regularly that Ankara's air force has struck civilian areas where there is no PKK activity. THE NEXT Israeli government should weigh whether Israel can accept as a mediator a country that speaks, albeit elliptically, of our destruction. Meanwhile, if Turkey persists in its one-sided, anti-Israel rhetoric, the Foreign Ministry might consider recalling our ambassador in Ankara for consultations. Turkey needs to choose between bridging the gap between East and West and flacking for the kind of dead-end Islamist policies championed by Iran, Hizbullah and Hamas - policies that threaten to destabilize the entire region.