Ban Ki-moon had urged the Iranian president to be "balanced"
UN chief Ban Ki-moon has said Iran's President Mahmoud Ahmadinejad "misused" an anti-racism conference at which he called Israel a racist state.
The Iranian president's speech sparked wide condemnation and a walkout by EU delegates. Iran criticised Mr Ban's comments as "one-sided".
The UN said Mr Ahmadinejad had dropped language from his speech describing the Holocaust as "ambiguous and dubious".
Meanwhile, conference delegates adopted a resolution against racism.
UN human rights chief Navi Pillay said the declaration, which also covered issues such as xenophobia and intolerance, was an answer to Mr Ahmadinejad's tirade.
She said the document included a line stating that "the Holocaust must never be forgotten," and that Iran, as a participating state, had signed up to it.
But the BBC's Imogen Foulkes in Geneva says the controversy surrounding the Iranian president's comments turned what should have been a shining example of the UN at its best into a bitter and divisive farce.
The original text of Mr Ahmadinejad's speech said that after World War II, Western nations had "resorted to military aggression to make an entire nation homeless, on the pretext of Jewish sufferings and the ambiguous and dubious question of Holocaust".
Following World War II, [Western nations] resorted to military aggression to make an entire nation homeless, on the pretext of Jewish sufferings and the ambiguous and dubious question of the Holocaust.
(As published by the Permanent Mission of the Islamic Republic of Iran.)
After World War II, by exploiting the Holocaust and under the pretext of protecting the Jews they made a nation homeless with military expeditions and invasion.
(BBC translation from speech transcript in Persian supplied by the Islamic Republic of Iran News Network.)
But UN officials said the Iranian president had dropped the terms "ambiguous and dubious", speaking instead of "exploiting the Holocaust".
Nevertheless, during a trip to Malta on Tuesday, Mr Ban said it was "very regretful that the conference was misused by the Iranian president for political purposes".
"Before the speech I had a long bilateral meeting with President Ahmadinejad and urged him to give a balanced and constructive contribution to the conference because he was the only head of state present," he was quoted as saying by Reuters news agency.
Mr Ahmadinejad spoke on Monday at the start of the five-day UN conference in Geneva.
Jewish migrants, he said, had been sent from Europe and the US after World War II "in order to establish a totally racist government in the occupied Palestine".
He continued: "And in fact, in compensation for the dire consequences of racism in Europe, they helped bring to power the most cruel and repressive racist regime in Palestine."
His comments prompted a walkout by delegates from at least 30 countries, and a raft of condemnation from Western officials.
Diplomats who remained, however, applauded as Mr Ahmadinejad continued his address.
Some countries, including the US and Israel, had boycotted the conference because the Iranian president was appearing.
On Tuesday US President Barack Obama said that the kind of rhetoric Mr Ahmadinejad had used was "harmful" to Iran's relations with the US and its position in the world.
But he also said the US would "continue to pursue the possibility of improved relations and a resolution to some of the critical issues in which there have been differences - particularly around the nuclear issue".
Earlier, Mr Ban had expressed dismay at both the boycotts and Mr Ahmadinejad's speech.
He said the speech had been used "to accuse, divide and even incite".
Iranian state TV quoted a foreign ministry spokesman as saying that Mr Ban's comments "displayed a one-sided and unreasonable approach".
Mr Ahmadinejad returned home on Tuesday to what was officially described as a "sensational" welcome.
The five-day Geneva talks - officially called the Durban Review Conference - are meant to review progress in fighting racism since a 2001 forum in Durban, South Africa.
That conference ended in acrimony when the US and Israel withdrew after Arab countries tried to introduce language defining Zionism as racism.