Erdogan tried to respond to an emotional 25-minute defense of Israeli military operations in Gaza by President Shimon Peres, but when after about a minute he was told he could not speak as it was time for dinner he walked out of the prestigious conference.
"Don't interrupt me. You are not allowing me to speak," he told the moderator, adding: "I will not come to Davos again."
He was given a hero's welcome when he returned to Turkey from Switzerland.
"The act of the Turkish prime minister reflects expectations of all Turkish people, the nations of the region and the entire world. We appreciate it. He behaved exactly how he should have behaved in that situation," Ahmadinejad told journalists.
The president of Iran again accused the Israeli government of committing war crimes in Gaza and declared that no aim could justify the killing of Palestinian civilians.
In Tehran on Saturday a group of protesters rallied outside the Turkish Embassy in support of Erdogan's actions. They chanted anti-Israeli and anti-American slogans, and some schoolchildren in the crowd carried flowers.
The new U.S. envoy to the Middle East, George Mitchell, is due to meet Erdogan in Turkey on Sunday. The Turkish prime minister said he was angry at not being allowed to speak, rather than at Israel or Peres, while the Israeli president said he did not expect Turkish-Israeli relations to be affected.
Israel's recent military operation in Gaza killed some 1,300 Palestinians. Up to 50,000 people were also left homeless in the enclave of 1.5 million. Israel's casualties in the conflict were put at 13, including 10 military personnel.
Add to blog
You may place this material on your blog by copying the link.
Image Galleries: Yury Gagarin: A down-to-earth person
Infographics: The Linguistic Diversity of the Planet
Ukraine has not preserved its 1991 borders. The signing of the Geneva memorandum on April 17 reaffirmed the willingness of Russia, the United States and EU countries to reach a compromise. While the sides continue to trade tough talk and symbolic sanctions, the Kremlin and the White House are also holding a parallel dialogue on the coordinated geopolitical revision of Eastern Europe.