Nikki Haley, United States Ambassador to the United Nations, speaks on the floor of the General Assembly on December 21, 2017 in New York City. (Spencer Platt/Getty Images/AFP)

The United Nations General Assembly on Thursday defied warnings from the United States and overwhelmingly passed a resolution condemning the Trump administration’s recognition of Jerusalem as Israel’s capital and calling on countries not to move their diplomatic missions to the city.

A total of 128 countries voted in favor of the text, defying the threats — that were forcefully reiterated in address before the vote by US envoy Nikki Haley —  to cut aid to countries that opposed the motion.

Nine countries — the US,  Israel, Togo, Micronesia, Guatemala, Nauru, Palau, Marshall Islands and Honduras — voted against the resolution.

There were 35 abstentions, including a number of countries that had been widely expected to support the move, such as Colombia, Mexico, Malawi and Rwanda. A further 21 countries did not vote at all.

By abstaining, Hungary, Croatia, Latvia, Romania and the Czech Republic broke European Union consensus on the vote. The EU had previously vehemently rejected any attempt to change Jerusalem’s status in the absence of a final peace deal between Israelis and Palestinians.

On Monday, in the Security Council, 14 out of 15 members voted in favor of the resolution, which failed to pass due to an American veto. There are no vetoes at the General Assembly, but — as opposed to the Security Council — resolutions passed there are not legally binding.

In November 2012, 138 countries voted on favor of a General Assembly resolution giving nonmember state status to the “State of Palestine.” Nine countries opposed the motion, with 41 abstentions. Less than a month ago, 151 countries voted in favor of a General Assembly resolution that condemns Israel in much harsher terms than Thursday’s vote. Only six countries opposed the motion, while nine abstained.

Recalling previous General Assembly and Security Council resolutions, the text passed Thursday expressed “deep regret at recent decisions concerning the status of Jerusalem,” referring to Trump’s December 6 decision to recognize Jerusalem as Israel’s capital and his announced intention to move the US embassy to the city.

The resolution also affirmed that “any decisions and actions which purport to have altered, the character, status or demographic composition of the Holy City of Jerusalem have no legal effect, are null and void and must be rescinded in compliance with relevant resolutions of the Security Council, and in this regard, calls upon all States to refrain from the establishment of diplomatic missions in the Holy City of Jerusalem.”

Without naming any country, it expressed “deep regret at recent decisions concerning the status of Jerusalem.”

Before the vote, a series of officials addressed the “emergency special session” on “[i]llegal Israeli actions in Occupied East Jerusalem and the rest of the Occupied Palestinian Territory.” The session was called by Yemen and Turkey.

The US ambassador to the UN, Haley, defended the administration’s recognition of Jerusalem as Israel’s capital, said the US had the sovereign right to place its embassies where it wished, and warned that America — the biggest funder of the UN — did not take kindly to being disrespected and paying for the “dubious privilege.”

“The decision does not prejudge any final status issues, including Jerusalem’s boundaries. The decision does not preclude a two-state solution, if the parties agree to that,” she said. “The decision does nothing to harm peace efforts. Rather, the president’s decision reflects the will of the American people and our right as a nation to choose the location of our embassy.”

“America will put our embassy to Jerusalem,” Haley stressed. “That’s what the American people want us to do. And it’s the right thing to do.” No vote at the UN will make any difference on the American decision, she declared. But this vote will be remembered, she vowed, when America is being asked once again to make the single-largest contribution to the UN budget or when “so many countries come calling on us, as they so often do, to pay even more and to use our influence for their benefit.”

“Those who support today’s resolution are like puppets pulled by the strings of the Palestinian puppet masters,” Israel’s Ambassador to the UN Danny Danon said. “You are like marionettes forced to dance while the Palestinian leadership looks on with glee.”

Passing the resolution distances the prospects for peace, Danon added. “If you vote for it, you’re rejecting peace,” he said, adding that he had no doubt that this resolution will end up “in the trash bin of history.”

During his speech, Danon displayed a coin from 67 AD minted during the Jewish revolt against the Romans, replicas of which had been distributed to the UN ambassadors before the vote. “On this coin is written ‘Freedom of Zion.’ It proves the ancient connection of Jews to Jerusalem,” Danon said. “No UNESCO declaration, no empty speeches, no General Assembly resolution will ever drive us from Jerusalem.”

Palestinian Authority Foreign Minister Riyad al-Maliki attacked the US recognition of Jerusalem as an act of “aggression.” Palestine accepts the US’s right to make sovereign decisions, but only as long they are in line with international law, he said.

Turkish Foreign Minister Mevlüt Çavuşoğlu called Trump’s Jerusalem recognition a violation of international law and an “attack on all universal values.”

He said that a member state had threatened all the other members to vote no or “face the consequences,” likely referring to the US. Countries were threatened with development aid cut, he went on. “This is bullying and this chamber will not do that. It is unethical to think the votes and dignity are for sale. … We will not be intimidated. You may be strong, but that does not make you right.”

Israeli officials had rejected the vote’s outcome before it took place.

“The State of Israel flatly rejects this vote even before it is held,” Prime Minister Benjamin Netanyahu said earlier on Thursday. “Jerusalem is our capital. We will continue to build in it and foreign embassies, led by the US embassy, will move to Jerusalem. It will happen.”

In the run-up to Thursday’s vote, Israeli diplomats stationed abroad made strenuous efforts to get as many countries as possible to oppose or abstain on the resolution.

“The Foreign Ministry is continuing its efforts to persuade as many countries as possible not to support the resolution, including by avoiding the vote,” Foreign Ministry spokesperson Emmanuel Nahshon said hours before the vote.

“It is an effort stretching across the globe, in every continent,” he said. “Special effort is being made in Europe, in the hope of preventing a European consensus supporting the resolution.”

On Wednesday, Trump had praised Haley for warning foreign diplomats that she will be “taking names” of countries that support the resolution criticizing America’s position on Jerusalem.

“I like the message that Nikki sent yesterday at the United Nations for all of these nations that take our money and then they vote against us at the Security Council, or they vote against us potentially at the assembly,” the president told members of his cabinet in the White House.

“They take hundreds of millions of dollars and even billions of dollars, and then they vote against us,” he said. “Well, we’re watching those votes. Let them vote against us, we’ll save a lot. We don’t care.”