But it could well harm Turkey's role as a bridge between the West and the Muslim world and as a would-be mediator between Israel and its Arab neighbors. Moreover, it won't help Ankara's relations with Washington or the country's EU membership bid.
Thousands gave Erdogan a hero's welcome at Istanbul airport, hailing his pro-Palestinian outburst, and chanting: "Turkey is proud of you!" Turkey's pro-government newspapers, as well as much of the Arab and Iranian media, reported positively on Erdogan's appearance.
But other commentators -- including some in the Turkish media -- are wondering how Erdogan's outburst will affect Turkey's international and regional standing.
There have been attempts at damage control: Peres called Erdogan to say that, regardless of the dispute, he admired Turkey and the prime minister.
And Erdogan reiterated that he stood by his criticism of the Gaza assault, but that he respected the Jewish people and his comments should not be interpreted as "anti-Semitic." But the damage may be hard to reverse.
Traditionally, Turkey has maintained good relations with both Israel and the Arab world. Last year, Ankara successfully tried to mediate Israeli-Syrian peace talks, despite a cool approach by the Bush administration.
Turkey's efforts under Erdogan's Justice and Development Party (AKP) to liberalize the economy and make legislative reforms has earned it positive feedback from Brussels, which is considering Turkey's EU membership, and from Washington, which is keen to see the success of a moderate and democratic Muslim country.
Move Toward Muslim World
But last year, Turkey took steps that many analysts saw as a shift away from the West and toward closer ties with the Muslim world and Russia.
While freezing the internal reform process, Ankara reacted rather passively in criticizing Russia's offensive in Georgia last summer and campaigned for a Caucasus Stability and Cooperation Pact, which had not been coordinated with the West and would include Russia.
Erdogan himself called off Ankara's mediation efforts in talks between Israel and Syria. He pointedly did not visit Israel as part of his Middle East visit in recent weeks.
Resisting the overwhelming Western approach to consider Hamas and Hizballah as terrorist organizations, Ankara has argued that these groups represent parts of the Arab world that must be reckoned with and talked to instead of isolating and antagonizing them.
On January 29, Turkish Foreign Minister Ali Babacan reiterated his government's position that Ankara is critical of Hamas but says it should be included in peace talks.
Turkey was the first pro-Western Muslim country to invite a delegation of Hamas for an official visit to Ankara in 2006. And according to Murat Yetkin, writing in the liberal "Radikal" newspaper, Erdogan met with foreign journalists ahead of the Davos debate with Peres and noted that U.S. President Barack Obama would be better advised to redefine terrorist organizations in the Middle East and follow a new policy based on those new definitions.
It appears, though, that Erdogan's outburst was about more than just political calculation and perhaps reflected his bossy and undiplomatic style, triggered by his anger over Gaza.
Turkish journalists close to the AKP report that Erdogan has been boiling with anger since Israel's Gaza offensive. "I have been watching Erdogan since the late 1980s," wrote Turkish analyst Rushen Chakir in the daily "Vatan," "seeing him angry many times." "From the point of diplomacy, I was certainly surprised. But [the fiery appearance at Davos] was typically Erdogan as I know him."
In his Davos outburst, the Turkish prime minister used the informal form of the word "you" (sen) instead of the more respectful "siz," something he does when addressing the opposition in the Turkish parliament.
His style of talking loudly, in a bossy and didactic tone, with little respect for the political opponent, has been a subject of both concern and humor among the Turkish people. Some critics refer to him as the "cowboy of Kasimpasha," the area of Istanbul where Erdogan grew up. His style is shared by Erdogan's main political opponent, Deniz Baykal, who heads the opposition and secular Republican People's Party in parliament.
But in a time of economic crisis, ever-less-promising talks on EU accession, a shaky relationship with Washington, and an increasing need and opportunity for a negotiated peace in the Middle East under President Obama, Turkey cannot afford such emotional outbursts.
The country deserves leaders who care not just about getting votes domestically but can also regain diplomatically the international support the AKP received when it was elected in 2007.
Abbas Djavadi is associate director of broadcasting at RFE/RL. The views expressed in this commentary are the author's own and do not necessarily reflect those of RFE/RL
Anger At Israel
Turkish Prime Minister Recep Tayyip Erdogan stormed out of a debate with Israeli President Shimon Peres at the World Economic Forum in Davos, Switzerland. He was later welcomed by cheering supporters when he returned home to Istanbul. Video By Reuters. Play