By Barbara Plett
BBC UN correspondent, New York
Mr Obama used his first UN address to urge the world to stand united
The first day of the UN General Assembly was dominated by three men.
New US President Barack Obama set the stage with a sweeping speech announcing America's re-engagement with the UN.
Coming after the winter years of the Bush administration, this was a gale of spring air.
Mr Obama was given a warm reception by member states as he outlined the challenges that define US foreign policy and called for international co-operation to meet them.
Following close on his heels was Libya's leader Col Muammar Gaddafi.
He was also making his debut address to the assembly - although after 40 years in power - in what was unquestionably the most bizarre performance of the day.
Col Gaddafi's speech lasted for about an hour-and-a-half
Dressed in flowing robes and making very occasional references to handwritten notes, he embarked on a diatribe that rambled on for an hour-and-a-half.
He simultaneously praised Mr Obama and attacked the UN Security Council, frequently wandering off on tangents that ranged from jet-lag to ruminations about the killer of John F Kennedy.
The assembly hall slowly emptied out as Col Gaddafi castigated the UN as a failed institution: dominated by a handful of world powers with veto-rights, relegating most of the member states to nothing more than a talking shop like "speakers' corner in Hyde Park".
He branded the council a "terror council," a step too far for those who see him as a dictator who brutally silences his opposition.
Mr Obama and Britain's Gordon Brown managed to avoid any embarrassing meetings with the quixotic colonel, mindful of domestic anger over Scotland's early release of the Libyan convicted of the 1988 Lockerbie bombing, and his hero's welcome in Tripoli.
After the Libyan leader finally sat down, an indignant Mr Brown changed his speech to defend the founding principles of the UN.
The third player was on the scene long before he appeared on the stage: Iranian President Mahmoud Ahmadinejad.
Concerns about Iran's nuclear ambitions found their way into the speeches of those countries who fear it might be building a bomb.
Mr Obama warned Iran (and North Korea) that they must face consequences if they chose to "ignore international standards".
Mr Brown went further, saying there was political will to consider tougher sanctions if a new round of negotiations between Iran and six world powers fails.
French President Nicolas Sarkozy issued a draconian warning, telling Iran that underestimating the resolve of the international community would be a "tragic mistake".
Mr Ahmadinejad himself didn't mention Iran's nuclear programme in front of the assembly, nor did he seem distracted by walkouts to protest his denials of the Nazi Holocaust, and what many see as his fraudulent re-election.
In typical style he lambasted Israel and the West for double standards, failed ideologies and imperial interventions.
But he said Iran was prepared to "warmly shake all those hands which are honestly extended to us", perhaps positioning himself ahead of next week's talks.
What was the balance of power at the end of the day?
Mr Ahmadinejad lambasted Israel and the West for double standards
President Obama made a good impression, but in terms of sorting out core issues - like Middle East peace and climate change - he's already shown a weak hand.
Some of the issues raised by Col Gaddafi resonated with member states from the developing world, although most lost patience with his convoluted lecturing. He didn't do himself any good, but probably not much harm either.
On paper Mr Ahmadinejad looks like the loser, with Western states lining up against him.
Russia's President Dmitry Medvedev also appeared to move closer to backing the sanctions option, tempering his opposition after talks with Barack Obama.
But cautiously: Russian diplomats said all other means should be exhausted first, and any sanctions would follow only if the UN's nuclear watchdog provided sufficient grounds.
China, the other hold-out in the UN Security Council, didn't mention Iran's nuclear programme, and was reportedly cool to Mr Obama's overtures on it.