The outbreak of hostilities around the Gaza Strip has brought up Turkey’s role in the Middle East with added urgency. Under the leadership of Prime Minister Recep Tayyip Erdoğan and Foreign Minister Ahmet Davutoğlu, the Justice and Development Party (AKP) government has been seeking to reposition Turkey as a regional power. Following the new realities created by the Arab revolutions, Ankara was supposed to use its economic prosperity and political influence to promote stability and peace in the conflict-torn region.

However, as the current crisis erupted, Turkey found itself marginalized and unable to maneuver effectively. The reason for that is clear: over the past two years, Turkey has damaged its relations with Israel and identified itself with Hamas to the extent that it has lost any credibility as an honest broker and a fair mediator. Beyond statements of harsh condemnation against Israel and enthusiastic support for Hamas, Erdoğan and Davutoğlu can do practically nothing.

Without the diplomatic capability to talk to Jerusalem, and having lost all trust within Israeli political circles, the Turkish prime minister can only sit in Cairo and watch how President Mohamed Morsi of Egypt mediates a cease-fire and negotiates a long-term arrangement between Israel and Hamas, with Egyptian guarantees, to boot. You need to talk to both sides if you want to be able to do that – Morsi, a president from the Muslim Brotherhood no less, can; Erdoğan, prime minister of Turkey, cannot.

Things were not always like that, of course. In better times, Erdoğan himself was able to mediate between Israeli Prime Minister Ehud Olmert and Syrian President Bashar al-Assad and could have an open dialogue with past and present Israeli governments. But it was his choice to escalate the conflict and bring about a virtual collapse of the relationship between the two countries. What is clearly being put in jeopardy here is the Turkish national interest, not only by sidelining Ankara in the Gaza conflict; if things remain as they are now, Turkey will be unable to play any role in future negotiations between the Palestinian Authority and Israel, and it is already severely handicapped in dealing with the Syrian civil war, with the conflict in Iraq, as it is with the politics of the eastern Mediterranean energy fields. In the absence of any serious cooperation with Israel, potential dangers for Turkey lie also in the area of knowing about terror threats and effectively fighting them.

It is, therefore, time for Erdoğan to reassess his policy toward Israel in light of recent events. It is time to abandon the rhetoric that gets the Arab street all worked up and scores a few points among uninformed, excitable Turks as well. It is time for pragmatic, level-headed Realpolitik. Erdoğan is certainly capable of doing that – he is highly intelligent, very popular, and clearly understands what is expedient, not just what may seem at certain points “honorable.” He does not have to love Israel; but for Turkey’s sake, he must be able to work with the Israeli government.

The Mavi Marmara affair was a serious issue, no doubt, but both Turkey and Israel, each in its own history, managed to handle and resolve much worse events. It is time to return to the text worked out in Geneva by Ambassador Özdem Sanberk and Mr. Joseph Chiechanover, who represented Turkey and Israel in talks before the Palmer report was leaked to the New York Times and then published by the U.N. There are indications that Prime Minister Benjamin Netanyahu will revisit the formula with a fresh, positive look. Involving Egypt on the issue of lifting the Gaza blockade on all goods but arms would deal with the third Turkish condition, whereas even Turkey might now understand why an arms blockade is absolutely necessary for Israeli security.

Both in Ankara and Jerusalem efforts should now be made to repair the relations and allow Turkey to have a say and play a constructive role in the newly emerging Middle East and Mediterranean.

Professor Ehud R. Toledano is the university chair for Ottoman and Turkish Studies at Tel Aviv University.