President Obama argues at the U.N. General Assembly that U.S.isolationism could leave a leadership vaccuum in the world. (Sarah Parnass/The Washington Post)

President Obama said Tuesday that he will use the remainder of his term to pursue better relations with Iran in the hope of resolving the controversy surrounding its nuclear program, pledging an activist U.S. agenda in the Middle East and beyond despite growing isolationist pressure at home.

In a 50-minute address to the U.N. General Assembly, Obama said he will devote his diplomatic efforts in the region to securing an Israeli-Palestinian peace agree­ment, hopeful that talks now underway through American encouragement may end the long conflict. He said that “real breakthroughs” on those two issues would “have a profound and positive impact on the entire Middle East and North Africa.”

Iran’s new president, Hassan Rouhani, in his own address to the General Assembly on Tuesday evening, was at times sharply critical of U.S. foreign policy in the region, echoing the complaints of his predecessor over the treatment of Palestinians, the use of drones and other issues.

But he also pledged serious international negotiations over Iran’s nuclear program in a speech apparently designed to appeal to competing political interests inside Iran.

“We can arrive at a framework to manage our differences,” Rouhani said, with Iran and the United States on “equal footing.”

At the U.N. General Assembly in New York, President Obama urged the international community to help secure two sovereign, peaceful states for Israel and Palestine. (The Washington Post)

Rouhani, making his debut at the world body, said he had ­“listened carefully” to Obama’s address from the same podium earlier in the day. He said Iran hopes that U.S. leaders can summon the political will to “refrain from following the shortsighted interests of warmongering pressure groups.”

The exploratory effort at renewed negotiations between Iran and the West will begin in earnest this week with a meeting at the United Nations between Iran’s foreign minister and Secretary of State John F. Kerry, one of the highest-level contacts between the two countries in years.

Although White House officials had signaled that a meeting — or an informal encounter — between Obama and Rouhani was a possibility, the Iranian leader did not appear at a luncheon where an exchange could have taken place. Senior White House officials said Tuesday that Iranian diplomats decided against a meeting, worried about how it would be received by hard-liners at home.

No U.S. president has met formally with an Iranian leader since the country’s 1979 revolution swept aside the U.S.-backed shah. One senior administration official, speaking on the condition of anonymity, said “it was clear that it was too complicated for them.”

“The Iranians have an internal dynamic that they have to manage,” a second senior administration official said. “And the relationship with United States is clearly quite different than the relationship that Iran has with other Western nations.”

Obama’s address was his fifth to the General Assembly, and it reflected the approach of a president defending a foreign policy record and looking toward securing a legacy after he leaves office. By defining relations with Iran and the Israeli-Palestinian peace process as his priorities for the region, the president made clear that he intends to be measured by his progress on the same issues that have repeatedly vexed his predecessors.

“Some may disagree, but I believe that America is exceptional,” he said, using a term he has been criticized for not fully embracing in the past. He said his belief is justified “in part because we have shown a willingness, through the sacrifice of blood and treasure, to stand up not only for our own narrow self-interest but for the interests of all.”

Although Obama did not announce a new policy toward Iran, his tone of optimism signaled the administration’s openness to finding common ground with the Islamic republic’s leadership. That tone has come largely in response to the positive signals being sent by Rouhani, who was elected on a platform promising to repair his country’s relations with Europe and the United States.

Squeezed by economic sanctions designed to end the country’s nuclear program, many Iranians are eager for a political solution to the standoff. At the same time, Israeli officials warn that time is running out to reach a diplomatic agreement to end the uranium-enrichment program, threatening military action if no deal can be reached.

Israeli officials have responded skeptically to Rouhani’s pledges of engagement and fear that Iran will clandestinely seek to pursue a nuclear weapon. On Tuesday, the Israeli delegation boycotted Rouhani’s speech.

In a statement Wednesday, Israeli Prime Minister Benjamin Netanyahu characterized Rouhani’s remarks as “a cynical speech that was full of hypocrisy. Rouhani spoke of human rights even as Iranian forces are participating in the large-scale slaughter of innocent civilians in Syria.”

Netanyahu said Rouhani “condemned terrorism even as the Iranian regime is using terrorism in dozens of countries around the world,” and said the speech “’acked both any practical proposal to stop Iran’s military nuclear program and any commitment to fulfill UN Security Council decisions.”

“This is exactly Iran’s strategy — to talk and play for time in order to advance its ability to achieve nuclear weapons,” Netanyahu said.

Obama’s address reflected a growing sense in the administration that the president’s foreign policy legacy may be defined by events in the Middle East and North Africa, where secular and Islamic popular movements continue vying for political authority. He noted that consequences of the Arab Spring continue to ripple through the region.

“The current convulsions . . . remind us that a just and lasting peace cannot be measured only by agreements between nations,” Obama warned, referring to the worsening civil war in Syria. “It must also be measured by our ability to resolve conflict and promote justice within nations. And by that measure, it’s clear that all of us have a lot more work to do.”

Obama’s return to Israeli-Palestinian diplomacy signaled his large ambitions — and long odds of achieving all of them. The president visited Israel and the West Bank this year, hoping to set the groundwork to revive direct talks between Israeli and Palestinian leaders.

He managed to help restart direct talks during his first term, largely by pressuring Netanyahu to impose a 10-month freeze on settlement construction in the occupied territories. But negotiations lasted only weeks before breaking down in the fall of 2010 amid criticism from both sides of how Obama managed the process.

The president had largely avoided the peace process until his March trip to Jerusalem and Ramallah, where he noted in his speech Tuesday that he was encouraged by the desire for peace among many Israelis and Palestinians, particularly the young. Under U.S. guidance, Israeli and Palestinian officials began direct talks last month.

“So the time is now ripe for the entire international community to get behind the pursuit of peace,” Obama said. “Already, Israeli and Palestinian leaders have demonstrated a willingness to take significant political risks.”

Obama met Tuesday after his address with Palestinian leader Mahmoud Abbas, their first face-to-face time together since the new talks started. As the two leaders began their meeting, Abbas said, “We have no illusion that peace will be easy.”

The president is scheduled to host Netanyahu at the White House next week.

Anne Gearan and Colum Lynch at the United Nations and Ruth Eglash in Jerusalem contributed to this report.