Obama: US will 'do what we must' to stop Iran getting nuclear weapons Louis Lanzano / AP President Barack Obama greets 13-year-old Joshua Alvarez from Nassau County as he arrives at JFK International Airport in New York, Monday. Barack Obama will tell the United Nations General Assembly Tuesday that the United States will "do what we must" to stop Iran from getting a nuclear weapon, according to excerpts from his planned speech. The president will also say that while there is 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. 'Elimination of Israel' According to Obama's speech, he will say that the U.S. wants to find a peaceful solution to the problem and believes "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," the speech says. 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 adds. It risks triggering a nuclear-arms race in the region, and the unraveling of the non-proliferation treaty. That is why a coalition of countries is holding the Iranian government accountable. And that is why the United States will do what we must to prevent Iran from obtaining a nuclear weapon. 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. Attack on 'very ideals' of UN His prepared remarks also discuss the attacks on U.S. embassies and consulates - including the one that killed Ambassador Chris Stevens and three other Americans - amid outrage over a California-made film that mocked the Prophet Muhammad. 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 was due to say. If we are serious about those ideals, we must speak honestly about the deeper causes of this crisis. Because we face a choice between the forces that would drive us apart, and the hopes we hold in common," he adds. Today, we must affirm 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 was also expected to take Syrian President Bashar Assad to task for efforts to crush an 18-month uprising against his regime. The unsettled climate surrounding Obama's U.N. visit will be a stark reminder that the heady optimism that greeted him when he took office promising to be a transformational statesman has cooled. 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. Ian Johnston, of NBC News, and Reuters contributed to this report.