IE 11 is not supported. For an optimal experience visit our site on another browser.

Obama: US will 'do what we must' to stop Iran getting nuclear weapons

Updated at 12:05 p.m.

Updated at 12:05 p.m. ET: Barack Obama told the United Nations General Assembly Tuesday that the United States will "do what we must" to stop Iran from getting nuclear weapons.

The president also used the high-profile event to commemorate late Ambassador Christopher Stevens, who was slain with three other Americans when the U.S. consulate in Bengazi, Libya, came under attack Sept. 11.

"There are no words that excuse the killing of innocent" people and "no video that justifies an attack on an embassy," Obama told the General Assembly.  

He stressed that recent violence should not been seen simply as attacks on America. 

Obama denounces violence in Middle East, calls for tolerance and democracy

"They are also an assault on the very ideals upon which the United Nations was founded -- the notion that people can resolve their differences peacefully, that diplomacy can take the place of war, that in an interdependent world, all of us have a stake in working towards greater opportunity and security for our citizens," he said. 

'Time is not unlimited'On Iran, Obama said that while there was still time for a diplomatic solution to the crisis that "time is not unlimited."

Amid mounting tensions over Iran's nuclear program and talk of a military strike by Israel on Iran, Obama has refused demands from Israeli Prime Minister Benjamin Netanyahu to set an explicit "red line" for Tehran.

Netanyahu has shown growing impatience over Obama's entreaties to hold off on attacking Iran's nuclear sites to give sanctions and diplomacy more time to work.

Underscoring the depth of the problem, Iranian President Mahmoud Ahmadinejad said in New York on Monday that Israel has no roots in the Middle East and would be "eliminated," ignoring a U.N. warning to avoid his usual incendiary rhetoric ahead of the annual General Assembly session. Iran denies seeking a nuclear bomb.

Obama said that the U.S. wanted to find a peaceful solution to the problem and believed "that there is still time and space to do so."

“But that time is not unlimited. We respect the right of nations to access peaceful nuclear power, but one of the purposes of the United Nations is to see that we harness that power for peace,” he said.

“Make no mistake: A nuclear-armed Iran is not a challenge that can be contained. It would threaten the elimination of Israel, the security of Gulf nations, and the stability of the global economy. It risks triggering a nuclear-arms race in the region, and the unraveling of the non-proliferation treaty,” he said.

“That’s why a coalition of countries is holding the Iranian government accountable. And that’s why the United States will do what we must to prevent Iran from obtaining a nuclear weapon,” he added.

US-Israel rift over Iran widens; Obama denies Netanyahu asked for meeting

Speaking Tuesday to the General Assembly, U.N. Secretary-General Ban Ki-moon said he rejected threats of military action by one state against another, an apparent reference to recent comments by Israeli, Iranian and U.S. officials.

While he did not specify which countries he was talking about, Ban added, "I also reject both the language of delegitimization and threats of potential military action by one state against another. Any such attacks would be devastating."

With exactly six weeks to go before the U.S. election, Obama will seek to reassure American voters as well as world leaders that they can count on him to handle the latest global challenges, even as Republican challenger Mitt Romney seizes the chance to pan his foreign policy.

With campaign pressures building in a close race, Obama's final turn on the world stage before facing voters has left little doubt about his immediate priorities.

Report: Iran mulls 'pre-emptive attack' against Israel; commander warns of 'World War III'

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 tradeoff that drew Republican criticism.

Obama planned to be in and out of New York in 24 hours, one of the briefest presidential visits to the annual U.N. session in recent memory, and he will be off to the election battleground state of Ohio on Wednesday.

'Disgusting' videoObama also discussed the attacks on U.S. embassies and consulates -- including the one that killed Stevens -- amid outrage over a California-made film that mocked the Prophet Muhammad.

"Today we must reaffirm that our future will be determined by people like Chris Stevens, and not by his killers.  Today we must declare that this violence and intolerance has no place among our United Nations," Obama said. 

He described the video that sparked the violence, "Innocence of Muslims," as "crude and disgusting" and an insult "not only to Muslims, but to America as well," but defended America's stance on freedom of speech.

"I know there are some who ask why we don't just ban such a video. The answer is enshrined in our laws: Our Constitution protects the right to practice free speech," he said.

"Here in the United States, countless publications provoke offense. Like me, the majority of Americans are Christian, and yet we do not ban blasphemy against our most sacred beliefs. As president of our country, and commander-in-chief of our military, I accept that people are going to call me awful things every day, and I will always defend their right to do so," he added.

Pugnacious Iranian president rips Israel, US ahead of final UN speech

Obama also took Bashar Assad to task for the Syrian president's efforts to crush an 18-month uprising against his regime.

"The future must not belong to a dictator who massacres his people. If there is a cause that cries out for protest in the world today, peaceful protest, it is a regime that tortures children and shoots rockets at apartment buildings," he said.

"And we must remain engaged to assure that what began with citizens demanding their rights does not end in a cycle of sectarian violence," he added.

The unsettled climate surrounding Obama's U.N. visit was a stark reminder that the heady optimism that greeted him when he took office promising to be a transformational statesman has cooled.

Iran increases price on writer Salman Rushdie's head by $500k

Campaigning in Colorado, Romney argued that the United States should not be "at the mercy" of events in the Muslim world. "We want a president who will shape events in the Middle East," he said.

A Pew poll found that while 45 percent of Americans approved of Obama's handling of the attacks on U.S. diplomatic missions in the Muslim world, only 26 percent backed Romney's criticism of his response. 

Reuters contributed to this report.

More world stories from NBC News:

Follow World News from on Twitter and Facebook