ISTANBUL (JTA) — Israel’s operation in Gaza is proving to be both a test and an opportunity for its strongest ally in the Middle East.

Turkey is trying to position itself as a regional Mideast mediator, but Prime Minister Recep Tayyip Erdogan’s harsh criticism of Israel and rising popular anger in the country against Israeli actions could strain relations with Jerusalem and compromise Ankara’s ability to play the role of honest broker.

For the past few years, Turkey has sought to establish itself as a regional power broker, strengthening ties with neighbors it previously had kept at an arm’s length and even bringing Israel and Syria together for a round of secret meetings in Istanbul.

Erdogan has been conducting his own shuttle diplomacy during the Israel-Hamas conflict, visiting Syria, Jordan, Egypt and Saudi Arabia earlier this month in a bid to broker a cease-fire between the foes. At the same time, however, his criticism of Israel has been significantly stronger than even most Arab leaders.

Israel is “perpetrating inhuman actions which would bring it to self-destruction,” Erdogan said at a recent municipal election campaign rally. “Allah will sooner or later punish those who transgress the rights of innocents."

Erdogan also called Israeli actions a "crime against humanity" and reportedly is refusing to take phone calls from Israeli Prime Minister Ehud Olmert with his nation’s troops in Gaza.

The Turkish newspaper Vatan noted that the only other leaders in the Middle East to use language like Erdogan’s have been regional firebrands Mahmoud Ahmadinejad and Muammar Gadhafi, the presidents of Iran and Libya, respectively.

The question is whether Erdogan’s statements have undercut Turkey’s ability to deliver on what it insists is the added value it brings to the Middle Eastern negotiating table: its ability to serve as a conduit to Israel.

"Erdogan’s choice of language presents Turkey as being ready to carry Hamas’ demands to the U.N. Security Council and as being unable to remain an equal distance from both sides,” Soli Ozel, who teaches international relations at Istanbul’s Bilgi University, wrote recently in the daily Sabah.

“This depicts Ankara as a less effective player than it really is and than it must be,” he wrote. "It restricts Turkey’s ability to play an active role in what happens. It damages Turkey’s credibility."

Still, experts say that mutual interests — particularly over regional security issues — will likely keep Turkey-Israel relations from rupturing. On the eve of the Gaza operation, which began Dec. 27, the two countries signed a $141 million deal in which Israel will provide the Turkish air force with airborne space imagery intelligence systems over the next four years.

"Long term, I don’t see much impact," said Lale Sariibrahimoglu, a military analyst based in Ankara. "Both nations need each other."

Sami Kohen, a columnist with the daily Milliyet and a veteran observer of Turkish foreign policy, agrees.

“There might be a kind of a cold atmosphere between the two countries for perhaps weeks to come, but I don’t anticipate any further action by Turkey in terms of reducing relations, particularly in terms of diplomatic ties,” Kohen said.

Indeed, despite his strong rhetoric, Erdogan has rejected calls by members of the Turkish Parliament to suspend Turkey’s ties with Israel.

"I would like to remind those who call for Turkey to freeze ties with Israel that we administer the Republic of Turkey, not a grocery market," Erdogan recently told parliament.

Erdogan’s reaction to Israel’s Gaza operation is based on real anger that his efforts of the past few years to bridge divides in the Middle East — particularly between Israel and Syria — may be going up in smoke as a result of the Gaza operation. But there is also a domestic component to his response.

Turks have reacted angrily to Israel’s actions, with large protests taking place nearly every day around Turkey. Even a basketball game in Ankara between Turkish and Israeli had to be called off after protesters stormed the court.

"This is the first time that the public reaction has been so widespread,” Kohen noted. “It’s very intensive this time. There haven’t been such widespread and spontaneous anti-Israel sentiments before.”

“It’s not just the Islamic circles,” he added. “It’s also the secularists and the nationalists. The protests have been representative of the whole of Turkish society.”

Meanwhile, Jewish community leaders in Turkey say they are concerned that the strong anti-Israel sentiment is also turning anti-Semitic.

Dayanisma Vakfi, an Islamic group, has been putting up graphic billboards all over Istanbul showing a bloody and smoldering baby’s shoe. Written next to the shoe in big letters are the words, "You cannot be the children of Moses" and, in smaller words, “Thou shalt not kill.”

A Jewish community official, speaking on condition of anonymity, said, “We are worried about the combination of all the biting, scathing items in the press that are coming out and the personal reactions that we are seeing."

With Erdogan’s Justice and Development Party (AKP) facing nationwide municipal elections in March, the government’s relations with Israel could be a liability.

Placards have been appearing at protests showing Erdogan and Olmert shaking hands and accusing the AKP of "collaborating" with Israel.

But Erdogan may also find himself walking a tightrope when it comes to distancing Turkey from Israel. Ankara has long depended on Israel to act as a conduit to Washington and to American Jewish organizations that frequently have acted as a kind of surrogate lobby for Turkey in Washington. In the past, Jewish organizations have been instrumental in helping Turkey block efforts to introduce resolutions in Congress recognizing Armenian genocide claims.

"There is real anger with Erdogan on Capital Hill and among people who follow Turkey in Washington," said a Washington-based consultant who closely monitors Turkish affairs. "Nobody is threatening anything right now or knows if there are going to be repercussions, but this is going to have an effect."

The consultant added, "There is a sense that Erdogan’s used up a lot of good will."