By Matt Spetalnick and Mark Felsenthal
UNITED NATIONS (Reuters) - Taking a detour from the campaign trail to the world stage, President Barack Obama sought on Tuesday to counter attacks on his foreign policy record from Republican rival Mitt Romney on everything from the Iranian nuclear standoff to U.S.-Israeli relations to the Arab Spring.
At the podium of the cavernous U.N. General Assembly hall six weeks before the U.S. election, Obama addressed both American voters and world leaders, as he defended his approach to global challenges that have started piling up in the final stretch of a close presidential race.
Obama's stern warning to Iran over its nuclear program was meant not only for the mullahs in Tehran and for Israeli Prime Minister Benjamin Netanyahu, who has pressed Washington to take a tougher tack, but also for pro-Israel voters who could help sway the election in battleground states like Florida and Ohio.
His challenge to the fast-changing Arab world to embrace democratic values of free speech and tolerance and reject the kind of anti-U.S. violence that has swept the region in recent weeks was a clear rebuttal to Republican accusations that he has apologized for America and weakened its global standing.
"I accept that people are going to call me awful things every day," Obama said, in a comment that could be read as referring to both flag-burning protesters in Islamabad and political opponents at home. "And I will defend their right to do so."
The line drew laughter from an audience that otherwise sat in mostly polite but stoic silence.
With Obama headed to battleground Ohio on Wednesday, and Romney arriving there on Tuesday for a bus tour with vice presidential running mate Paul Ryan, both presidential campaigns are likely to return to bread-and-butter economic messages.
But foreign policy and America's world standing have become more of a factor in the campaign during the last two weeks, as the Muslim world has been roiled by protests over a film mocking the Prophet Mohammed. The issues dominated the day.
Sensing an opening, Romney and Ryan have escalated their attacks on the president's handling of world events.
And after Obama's U.N. address, the Republican camp made clear they weren't letting up.
Eric Cantor, Republican majority leader in the House of Representatives, said Obama's foreign policy is "rudderless."
Paula Dobriansky, a Romney foreign policy adviser, was more specific.
"President Obama listed the Israeli-Palestinian peace process, Syria, and Iran as major challenges facing the international community," she said. "But those are three vital issues on which President Obama has unfortunately made no progress. The rhetoric doesn't match the policy."
Before returning to the campaign trail, Romney and Obama observed a brief ceasefire in New York, with both men delivering statesmanlike speeches to Bill Clinton's global charity.
Romney told the Clinton Global Initiative, a foundation set up by the former Democratic president, that the United States should do more to encourage free enterprise as a way of creating jobs in the developing world.
The Republican largely avoided criticizing Obama in front of an audience that included many prominent Democrats. But his message that U.S. foreign aid frequently supplants private enterprise reflected one of his central complaints against the Obama administration.
"A temporary aid package can jolt an economy. It can fund some projects. It can pay some bills. It can employ some people some of the time," Romney said. "But it can't sustain an economy — not for long."
Speaking at the same venue a few hours later, Obama outlined new steps to fight human trafficking.
Neither Romney nor Obama are likely to talk about foreign aid or human trafficking when they return to Ohio, a politically divided state that will be crucial in determining who wins the November 6 election.
With only six weeks until the vote, Romney is running out of time to gain ground on the incumbent president.
Obama widened his lead in the Reuters/Ipsos daily tracking poll to 7 percentage points over Romney, up 1 point from Monday. Obama now leads among likely voters 49 to 42 percent.
'DO WHAT WE MUST'
At the United Nations, Obama made his case in a statesmanlike way that struck a sharp contrast with the festive back-and-forth of campaign rallies that have come to occupy much of his time. But his message was still deeply infused with election-year politics.
Obama's annual visit followed protests over the anti-Islam video made in California that posed a huge dilemma for a U.S. leader who took office promising a "new beginning" with the Muslim world. He has also had to grapple with an escalating crisis in U.S.-Israeli relations over Iran's nuclear program and bloodshed in Syria, where President Bashar al-Assad remains in power despite Obama's demand that he step down.
Honing in on Iran, Obama warned that United States will "do what we must" to prevent it from acquiring a nuclear weapon and said time was running short for diplomacy.
That pledge fell far short of Netanyahu's demand that Obama set a "red line" that Tehran must not cross if it is to avoid military action, and it was unclear whether it would be enough to placate Netanyahu.
There was no immediate reaction to Obama's comments from Israeli leaders, with the country closed down for the holiest Jewish day of the year, Yom Kippur.
Obama also sought to reassure U.S. voters that he is doing everything he can to head off more violence like the recent September 11 attack in Libya that killed the U.S. ambassador and three of his colleagues.
Americans were stunned by recent 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.
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.
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 during the run-up to Election Day.
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.
With pressures building in the presidential race, Obama's brief final turn on the world stage 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 ABC's popular television talk-show "The View."
However, after coming under Republican criticism for the tradeoff, the White House said Obama did meet briefly with Yemen's new president, Abd-Rabbu Mansour Hadi. Obama dropped in on talks he was having with a senior U.S. aide and thanked him for helping protect U.S. diplomats during recent unrest in the country.
(Writing by Matt Spetalnick, Additional reporting by Steve Holland and Crispian Balmer in Jerusalem. Editing by Warren Strobel, Will Dunham and Christopher Wilson)