In a stinging rebuke of President Donald Trump’s controversial decision to declare Jerusalem the capital of Israel earlier this month, 128 countries, including some of the US’s most trusted and reliable allies, voted in favor of a United Nations resolution on Thursday calling for a reversal of his position. Only nine countries voted against it.

Though the resolution doesn’t explicitly refer to the US, it’s clearly directed at the White House. The measure declares that any changes to the status of Jerusalem “have no legal effect, are null and void and must be rescinded.”

It also “calls upon all States to refrain from the establishment of diplomatic missions in the Holy City of Jerusalem” — another shot at the administration, which announced plans to move the US Embassy from Tel Aviv to Jerusalem.

The closest thing the US got to support from allies was 35 abstentions. Friends of the US like Canada, Mexico, and Australia refrained from voting on the resolution — which means that while they didn’t support the US with a vote against it, they didn’t criticize the US either with a vote in favor of it.

While the passage of the resolution isn’t binding — meaning the US doesn’t actually have to reverse its position — it’s a stark illustration of just how isolated the United States is in its stance toward Israel.

Despite Trump’s efforts, the world voted against the US

Thursday’s vote took place at a rare emergency session of the 193-member UN General Assembly. Turkey and Yemen, on behalf of two international organizations of Arab and Muslim countries, called for the emergency session after the US vetoed a similar resolution at the UN Security Council on Monday. Unlike at the Security Council, the US does not have veto power at the broader General Assembly.

The administration made a concerted effort to swing countries to its side before the UN vote. Earlier in the week, US Ambassador to the UN Nikki Haley promised the US would be “taking names” of those who voted against the US. She also sent a letter to the UN ambassadors of more than 180 member countries warning that any vote in favor of the resolution would be taken “personally” by the president himself.

President Trump suggested during a Cabinet meeting on Wednesday that he would withhold billions of dollars in aid for countries that voted against the US.

“Let them vote against us; we’ll save a lot,” Trump said. “We don’t care.”

And in a speech before the General Assembly right before the vote on Thursday, Haley escalated things even further, threatening to cut off US funding to the UN over the vote.

“When we make generous contributions to the UN, we also have a legitimate expectation that our good will is recognized and respected,” Haley said. “When a nation is singled out for attack in this organization, that nation is disrespected.”

“We have an obligation to demand more for our investment,” she said.

But the pressure campaign didn’t work very well. Even close US allies like the UK and Egypt were unmoved by America’s dark warnings. And the fact that the vote stacked so heavily against the US after an unusually aggressive campaign from the Trump administration against it only exacerbated the optics of isolation.

Richard Gowan, a UN expert at the European Council on Foreign Relations, told me Haley’s abrasive politicking was a bit surprising. “While diplomats expect Trump to be crude, they may have expected a bit better from Haley. She is normally more pragmatic.”

There are even signs that the heavy-handed threats backfired. Barak Ravid, a correspondent for Israel’s Channel 10 news, reported that Canada switched from voting against the resolution to abstaining in order to avoid looking like a puppet of the US.

That Haley had to resort to such measures to try to convince even a few countries to side with the US highlights the extraordinary sensitivity surrounding Jerusalem, which has sites holy to Jews, Christians, and Muslims, and which both the Palestinians and the Israelis claim as their capital.

Jerusalem has always been polarizing. Now it’s even more so.

Trump’s December 6 speech recognizing Jerusalem as Israel’s capital broke with decades of bipartisan American foreign policy about the city’s future. Presidents of both parties have supported the idea of creating an independent Palestinian state alongside Israel, with the final status of Jerusalem to be decided as part of a peace agreement between the two sides.

Trump’s language during his speech wasn’t quite as inflammatory as it could’ve been. As Sarah Wildman pointed out for Vox at the time of the announcement, Trump didn’t call Jerusalem the undivided capital of Israel — suggesting the US would still support potentially dividing Jerusalem between the Israelis and the Palestinians as part of future peace negotiations.

But the move — along with the announcement that the US would move its embassy from Tel Aviv to Jerusalem — sparked outcry in the international community and further polarized one of the most contentious territorial disputes in the world.

Turkish President Recep Tayyip Erdoğan said on Sunday that he intends to open an embassy in East Jerusalem — the part of the city that Palestinians officially want as the capital of a future Palestinian state. That came days after he convened a gathering of Muslim leaders to call for the world to see East Jerusalem as the capital of the Palestinian state.

A statement signed by more than 50 Muslim-majority countries at that summit declared that the US had lost its role as a “sponsor of peace” in the Middle East. And Palestinian Authority President Mahmoud Abbas said in a speech last week that Trump’s Jerusalem announcement was a “crime” and that he no longer wants the US to broker peace talks between Israelis and Palestinians.

Gowan, the UN expert, says that ultimately all the UN theatrics probably won’t actually end up hurting the US.

“This is, ironically, a diplomatic win for all concerned,” he said. “The vast majority of UN members have shown that they are principled defenders of international law and the Palestinian people. The US has shown that it will go to the wire for Israel, and Trump can boast he is tougher than Obama on the Middle East. And everyone can go home for the holidays with a warm glow.”

Everyone, that is, but the Palestinians.