Mr Ahmadinejad's appearance caused boycotts, then walkouts
By Paul Reynolds
World affairs correspondent, BBC News website
President Ahmadinejad of Iran caused his expected splash at a UN conference on racism already deeply divided over Israel and the Palestinians and the degree to which religions should be protected from criticism.
He did not mention Israel by name (he not only opposes the State of Israel but has wished for and has predicted its demise) but said: "They sent migrants from Europe, the United States... in order to establish a racist government in occupied Palestine."
Many Western delegates at the conference walked out in protest. Hecklers shouted and a demonstrator in a clown's wig was ejected. Some other delegates applauded. Israel had earlier recalled its ambassador to Switzerland after the Swiss president met the Iranian leader.
Protesters interrupted the Iranian president's speech on two occasions
The conference, in Geneva, was called to discuss progress in countering racism and "related intolerance" as a follow up to a meeting in Durban in 2001. It seems to be copying the chaos that afflicted the first, with the difference that this time Iran has made itself an issue and that is important, because it does not bode well for the new dawn of relations with Iran that President Obama has called for.
The world has taken huge strides against racism over the last two centuries - slavery has been abolished, Nazi German racial theories have been vanquished, apartheid has gone.
It is easily forgotten how prevalent the concept of humankind being divided into "races" was until recently. When I was at school we were routinely taught about the history of the British and other "races". But the one issue that never seems to go away when conferences of this kind are held is the Israeli/Palestinian one.
A document has already been agreed among those governments attending and you have to read it quite closely to detect the tremors remaining from the earthquakes in discussions that went before.
No EU position
But enough contentious issues remain and the result is a boycott by the United States, Israel, Germany, Italy, the Netherlands, Australia, Canada and New Zealand, though Germany is sending an observer.
Britain and France and the Czech Republic are attending but are represented only by their ambassadors to the UN institutions in Geneva, where the meeting is being held.
It is noticeable that the European Union has failed to reach a common position.
And this year, the review conference is also divided over how to protect religious freedom, with fierce arguments about language interpreted by some as being an attempt by Islamic countries to shield Islam from criticism.
So what are the issues that have divided opinion?
The first - and most important for the US - is an innocuous sounding introduction that "reaffirms" the declaration made at the earlier conference.
There is now no mention of Israel and the Palestinians in the new document. But the US sees the reaffirmation of the 2001 declaration as the next worse thing
The problem here is that the Durban declaration said: "We are concerned about the plight of the Palestinian people under foreign occupation."
In 2001, the US, Israel and their supporters strongly objected to what they regarded as the singling out of Israel, the only country mentioned in the declaration, even though there was other language that respected the "rights to security for all states in the region, including Israel".
There is now no mention of Israel and the Palestinians in the new document. But the US sees the reaffirmation of the 2001 declaration as the next worse thing.
Then there is the phrase "foreign occupation" used in 2001. Although Israel and the Palestinians are no longer mentioned in the new document, the phrase has survived, though it is now used to emphasise the need to protect "all those under foreign occupation". That is enough of an echo of 2001 to disturb the US, Israel and its allies.
The question of Islam has also been a major one.
During the negotiations leading up to the meeting, there was an attempt by some Islamic countries to introduce the concept of "defamation of religion". This would have had the effect, western and other critics argued, of restraining free speech.
In the final document, there is still a hint of this debate. The text deplores the "derogatory stereotyping and stigmatization of persons based on their religion". However, Islam alone is not protected as the document deplores all religious intolerance including "Islamophobia, anti-Semitism, Christian phobia and anti-Arabism".
The text therefore has been hammered into a smoother surface. But enough rough patches remain to prevent a common agreement.