The Iranians snubbed him. The Brazilians upbraided him. Ted Cruz fauxlibustered him. And you just know that, behind the scenes, the Russians were messing with him.

At the end of a long, hard day at the United Nations, he escaped into the sweaty and freighted embrace of the Clintons, who had to explain and defend the president’s own health care plan for him at their global initiative conference / Hillary 2016 pep rally. The choreography of diplomacy danced around the tantalizing possibility of a historic handshake that could end three decades of poison. (Even though the last climactic clasp, between Yitzhak Rabin and Yasir Arafat, disappointingly proved that sometimes a handshake is just a handshake.)

With the welcome exit of the provincial Iranian fruitbat, Mahmoud Ahmadinejad, could the country W. declared part of the “axis of evil” reach out to the country smeared as the “Great Satan” by Ayatollah Khomeini? Obama administration officials at the U.N. on Tuesday explained to reporters that there would not be a bilateral between President Barack Obama and President Hassan Rouhani of Iran, or any sort of “formal meeting.”

“We’re not prepared for heads of state to negotiate or presidents to negotiate on the nuclear issue,” an official said, speaking on background. An “encounter” would be permissible. Not a long one, but an “informal, brief encounter.”

“So,” a reporter asked, “like a handshake?”

“Yes, that type of thing,” the official replied. “Exactly. On the margins here.”

Except that, after the White House spent a week suggesting that there could be a press-the-flesh moment, Rouhani snubbed Obama. And not on the margins.

Maybe the tweet-happy Iranian president was too busy retweeting Christiane Amanpour to have time to pretend to bump into the American president in a U.N. hallway. “Ultimately it became clear that that was too complicated for them at this time,” the Obama official said just before 3 p.m., trying to put a good face on the scuttled face-to-face, adding that “the Iranians, No. 1, have an internal dynamic that they have to manage” and they “were not ready to have an encounter at the presidential level.”

Even a brief encounter wasn’t brief enough.

“The assumption that a meeting per se could be decisive or help solve problems is absolutely wrong,” said the Iranian Foreign Ministry spokeswoman Marzieh Afkham. “We think that we should wait until a proper time for such a meeting comes. Our assessment is that the proper time hasn’t yet come.”

Poor President Obama, trying to figure out if the Russians and Iranians are offering trick or treat to America on WMD, as he lurches about with a foreign policy played out extemporaneously and ambivalently in “Obama’s brain and Ben Rhodes’ mouth,” as The New Republic’s Leon Wieseltier puts it. (An internal Israeli government document, The Washington Post reported, dismissed Rouhani’s charm offensive as “smile but enrich.”)

And poor Hillary Clinton, having to watch as the diplomatic breakthroughs, albeit haphazard and possibly illusory, happen on John Kerry’s watch, making her tenure look even more like that of a globe-trotting good-will ambassador. The president told the U.N. that future diplomatic efforts would focus on Iran’s pursuit of nuclear weapons and the Arab-Israeli conflict. Hillary largely steered clear of that conflict, knowing the domestic risks for the restoration of Clinton Inc.

The Obama snub is a replay of then-President Clinton’s dashed attempt at a brief encounter in 2000 at the opening of the General Assembly with the Iranian President Mohammad Khatami, who also tried to warm up relations with the West but got hampered by hard-liners at home. As The Times’ Mark Landler wrote, Clinton aides did everything they could to arrange a “coincidental” brief encounter — including asking that Clinton’s speech be just before Khatami’s and that Clinton be seated within chair-bumping range of Khatami at the secretary general’s lunch.

Prince Turki al-Faisal, the former Saudi Arabian ambassador to the U.S., told an audience at the Core Club in Midtown on Sunday evening that Obama raised expectations in the Arab world with his 2009 Cairo speech that were never met. But the president, stymied on Syria and dealing with an American public that never wants to hear the words “Sunni” or “Shiite” again, had a straight-up message for the Arab world.

“The United States is chastised for meddling in the region, accused of having a hand in all manner of conspiracy,” he said in his speech, “at the same time, the United States is blamed for failing to do enough to solve the region’s problems and for showing indifference toward suffering Muslim populations.”

He said that America’s ill-suited forays into occupying Muslim countries are over: “Iraq shows us that democracy cannot simply be imposed by force.”

A handshake can’t be imposed on someone who is not quite ready to come to grips.