At the United Nations on Tuesday, Mr. Obama drove home the conclusion that he came to after his own party deserted him over a military response to the chemical weapons attack that killed more than 1,000 Syrians: The bigger risk for the world in coming years is not that the United States will try to build empires abroad, he argued, but that there will be a price to be paid in chaos and disorder if Americans elect to stay home.

To Mr. Obama’s mind, his aides say, his worldview has changed little since he came to office in 2009, after a campaign promising to end a “dumb war” and to renew outreach to America’s adversaries.

But his image around the world is radically different from what it once was. From South Asia to the Middle East, his presidency became known more for roughly 400 drone strikes against affiliates of Al Qaeda and cyberattacks on Iran’s nuclear program, both of which he saw as direct threats. Despite his early overtures, diplomacy in the region stagnated.

Now, after a remarkable month that began with his planning and then aborting a Tomahawk missile strike against the military facilities of President Bashar al-Assad of Syria, Mr. Obama has recommitted himself, he told world leaders on Tuesday, to devoting the rest of his presidency to two high-risk diplomatic initiatives: finding a negotiated end to the Iran confrontation, and creating a separate state for the Palestinians that Israel can live with, without fear.

Success in a region that has stymied two Bushes and two Clintons would become the legacy issue of his presidency — but three years and four months is not a long time to resolve disputes that date back decades. It was a measure of how complicated those efforts are that Iran’s president, Hassan Rouhani, shied away Tuesday not only from a handshake but also from any substantive discussion of resolving its disputes with a country it has long denounced as the Great Satan.