Kathy Willens / AP U.N. Secretary-General Ban Ki-Moon.

In an extraordinary but little-noticed public rebuke, U.N. Secretary-General Ban Ki-Moon has condemned Iran’s supreme religious leader and president for “threatening Israel’s existence” in “offensive and inflammatory” comments about the Jewish state.

Ban’s rare public criticism on Friday did not noticeably cool the increasingly hostile public exchanges between Tehran and Jerusalem. On Tuesday, Iran’s mission to the United Nations complained about the “irony” of the U.N. leader’s failure to condemn Israeli officials for employing similar rhetoric.

Follow Open Channel on Twitter and Facebook.

In Friday’s statement, Ban singled out Supreme Leader Ayatollah Ali Khamenei and President Mahmoud Ahmadinejad for their recent comments.

"The Secretary-General is dismayed by the remarks threatening Israel’s existence attributed over the last two days to the Supreme Leader and the President of the Islamic Republic of Iran," Ban wrote. "The Secretary-General condemns these offensive and inflammatory statements.

"The Secretary-General believes that all leaders in the region should use their voices at this time to lower, rather than to escalate, tensions. In accordance with the United Nations Charter, all members must refrain from the threat or use of force against the territorial integrity or political independence of any State."

The condemnation, which didn't get much attention, went beyond any statement by Ban or previous secretaries-general on the tensions between Israel and Iran, an indication, say U.S. officials, that the U.N is taking Iran's anti-Israeli rhetoric seriously.

Apparently stung by the criticism, Iran on Tuesday wrote to the U.N. Security Council that Israeli officials have recently threatened to bomb Iran's nuclear program. It also states that the U.N. Security Council and "other relevant organs of the United Nations" have had "no reaction" to Israeli threats and in some cases have "aligned themselves with such statements."

The diplomatic equivalent of a shouting match began Thursday with comments by Khamenei on Quds Day, when Iran annually pledges solidarity with Palestinian groups and demands an end to Israeli control of Jerusalem.

More world coverage from NBCNews.com

Ex-Israeli intel chief speaks out on Iran strikes

Q&A: NBC's Richard Engel answers questions about Syria

Reports: Kim Jong Un will travel to Iran

Fears grow of Israel-Iran missile shootout

"The light of hope will shine on the Palestinian issue, and this Islamic land will certainly be returned to the Palestinian nation, and the superfluous and fake Zionist [regime] will disappear from the landscape," the 72-year-old cleric was quoted as saying.

On the same day, Defense Minister Ehud Barak said that while "there are risks” in an Israeli attack on Iran, “It's infinitely more dangerous, complicated, complex and costly in human lives and resources to deal with a nuclear Iran in the future.” His comments echoed those of Israeli Prime Minister Benjamin Netanyahu, who suggested on Aug. 1 that a military strike against Iran’s nuclear program may be imminent. "Time to resolve this issue peacefully is running out," he said.

On Friday, Ahmadinejad, speaking on Iranian television, made some of his most extreme comments about Israel since becoming president of the Islamic Republic.

“The Zionist regime and the Zionists are a cancerous tumor. Even if one cell of them is left in one inch of (Palestinian) land, in the future this story (of Israel’s existence) will repeat,” Ahmadinejad said. "The nations of the region will soon finish off the usurpers in the Palestinian land."

In responding to Ban’s statement on Tuesday, Iran's deputy ambassador to the U.N., Eshagh Al Habib, wrote to the U.N. Security Council to complain that Israel has repeatedly made threatening comments against Iran without being subjected to similar condemnation.

"The Islamic Republic of Iran expresses, once again, its deep concern over, and strong condemnation of. such a provocative, unwarranted and irresponsible statement by (the Israeli) Prime Minister and Defense Minister as well as other officials of (the) Israeli regime (who) frequently threaten Iran with military strike," wrote Habib.

He closed with a subtle but apparent slap at Ban: "The irony is that there has been no reaction on the part of Western leaders and/or relevant organs of the United Nations, including the United Nations Security Council, vis-a-vis the inflammatory remarks and baseless allegations leveled against Iran's peaceful nuclear program,” Habib wrote. “Rather some even spare no occasion to align themselves with such statements."

Diplomatic sources say that the rhetoric is likely to increase despite Ban's condemnation. They note that Ahmadinejad is likely to condemn Israel even more forcibly next month when he is expected in New York for the annual meeting of the U.N. General Assembly. It will be the Iranian president's last speech to the General Assembly as Iran's president before his term runs out in June.

Robert Windrem is a senior investigative producer for NBC News.