President Barack Obama declared on Tuesday the United States will "do what we must" to prevent Iran from acquiring a nuclear weapon as U.N. Secretary-General Ban Ki-moon warned against threatening attacks whose consequences would be devastating.
Taking the podium at the United Nations six weeks before the U.S. presidential election, Obama sought to counter criticism of his foreign record by Republican rival Mitt Romney, who has accused him of mishandling the Arab Spring uprisings, damaging ties with Israel and not being tough enough on Iran.
Obama also challenged world leaders to stand united against anti-American violence that has swept many Muslim countries in recent weeks and to promote tolerance amid anger over a crudely made video that offended Islam. "There are no words that excuse the killing of innocents," he said.
Seeking to step up pressure on Iran, Obama told the U.N. General Assembly that there is still time for a diplomacy but that "time is not unlimited."
His tough talk appeared aimed at easing Israeli concerns about U.S. resolve to curb Tehran's nuclear drive, as he reasserted before the world body that he would never let Iran develop an atomic bomb and then simply contain the problem.
But he stopped short of meeting Israeli Prime Minister Benjamin Netanyahu's demand to set a specific "red line" that Iran must not cross if it is to avoid military action, and did not go much farther in his rhetoric than previously.
"A nuclear-armed Iran is not a challenge that can be contained," he said. "It would threaten the elimination of Israel, the security of Gulf nations and the stability of the global economy."
"The United States will do what we must to prevent Iran from obtaining a nuclear weapon."
In an apparent allusion to recent comments by U.S., Israeli and Iranian officials, Ban opened the annual U.N. General Assembly by warning states against threatening to attack one another and sounded a pessimistic note about Arab-Israeli peace.
"I also reject both the language of delegitimization and threats of potential military action by one state against another," Ban said. "Any such attacks would be devastating."
U.S. officials have repeatedly said that all options are on the table against Iran - code for a possible military strike - while Israel's Netanyahu has called for a U.S. ultimatum to Iran. But Obama did not repeat that line in his speech.
On Monday, Iranian President Mahmoud Ahmadinejad said Israel has no roots in the Middle East and would be "eliminated." The White House dismissed his comments as "disgusting.
Without naming Ahmadinejad, Obama took a veiled swipe at him on Tuesday, saying the world must "leave behind" those who deny the Holocaust or reject Israel's right to exist.
Obama also sought to reassure U.S. voters that he is doing everything he can to head off any more violence like the September 11 attack in Libya that killed the U.S. ambassador and three of his colleagues.
A wave of Muslim rage over an anti-Islam video made in California has swept the Middle East, North Africa and South Asia. Americans were stunned by images of U.S. flags again burning in the Muslim world, the focus of intense personal diplomacy by the president at the start of his term.
"The attacks of the last two weeks are not simply an assault on America. They are also an assault on the very ideals upon which the United Nations was founded," Obama told the assembled world leaders.
This eruption of violence has confronted Obama with the worst setback yet in his efforts to keep the Arab Spring revolutions from turning against the United States - and has demonstrated that he has few easy options.
In his speech, he faced the delicate task of articulating U.S. distaste for insults to any religion while at the same time insisting there is no excuse for a violent reaction - a distinction rejected by many Muslims.
The crisis has exposed a deep divide over the issues of free speech and blasphemy at a time when Islamist forces are in the political ascendant in the Middle East after several veteran dictators were ousted.
"There is no speech that justifies mindless violence," Obama said. His audience listened mostly in polite silence, offering only a smattering of applause, but he drew laughter when he said that people say "awful things" about him every day and he accepts it.
Obama defended his approach to the Arab Spring but offered no detailed solutions to an array of crises that threaten to chip away at a foreign policy record that his aides hoped would be immune from Republican attack.
He also had harsh words for Syrian President Bashar al-Assad, saying his regime "must come to an end," a reminder of Assad's defiance of international calls for him to end a bloody 18-month crackdown and step aside.
And Obama renewed his call for Israeli-Palestinian peace talks - something he promised to make a priority when he took office but which he has failed to advance.
ELECTION THE PRIORITY
With campaign pressures building in a close race, Obama's final turn on the world stage before facing voters on November 6 left little doubt about his immediate priorities.
He skipped the customary one-on-one meetings with foreign counterparts but went ahead with the taping of a campaign-style appearance on the popular television talk-show "The View" - a trade-off that drew Republican criticism.
Obama planned to be in and out of New York in 24 hours and off to the election battleground state of Ohio on Wednesday.
Despite Obama's international woes, administration officials are heartened by Romney's own recent foreign policy stumbles and doubt that the president's critics will gain traction in a campaign that remains focused mainly on the U.S. economy.
In addition, the White House never tires of touting the killing of Osama bin Laden and the ending of the Iraq war as Obama's foreign policy accomplishments - points that the president made his speech.
Nevertheless, the unsettled climate surrounding Obama's U.N. visit was a stark reminder that the heady optimism that greeted him when he took office, and was awarded the Nobel Peace Prize within months, has now cooled.
Obama's early overtures to Iran were rejected, and the expansion of its nuclear program, which it says is purely peaceful, has created tension between Washington and Israel. Israel sees a nuclear-armed Iran as a threat to its existence.
Netanyahu has indicated impatience over Obama's entreaties to hold off on attacking Iran's nuclear sites to give sanctions and diplomacy more time to work.
The unusually public dispute between the United States and Israel has been exacerbated by Obama's decision not to meet with Netanyahu on his U.S. visit later this week, a move that risks alienating some pro-Israel voters.
Signaling resentment at Netanyahu's tactics, Obama told CBS's "60 Minutes" he would ignore "noise that's out there."
Editing by Will Dunham