The United Nations on Thursday delivered a stinging rebuke of President Trump's recognition of Jerusalem as Israel's capital, casting an overwhelming vote condemning the move and calling on the U.S. to withdraw the decision.

The final vote count in favor of the resolution was 128. Nine countries opposed the resolution while 35 abstained.

The resolution - essentially a formal statement of a U.N. opinion - is not legally binding. But it represents a condemnation of Trump's decision and exerts political pressure on him to reverse the move.

Some of the United States' closest allies moved to condemn the decision. The United Kingdom, France, Germany and Japan, among others, voted in favor of the resolution. Other allies, such as Canada, Mexico and Australia, abstained.

In the run-up to the General Assembly vote, Trump and U.S. Ambassador to the U.N. Nikki Haley sought to warn countries against opposing the Trump administration's Jerusalem decision.

"The United States will remember this day in which it was singled out in this assembly for the very act of exercising our right as a sovereign nation," Haley said ahead of the vote. "We will remember it when, once again, we are called up to make the world's largest contribution to the U.N., and we will remember it when many countries come calling on us to pay even more and to use our influence for their benefit."

Haley sent a letter to members of the international body this week, warning that Trump had instructed her to take stock of the countries that voted in favor of the resolution. The president followed up on that warning on Wednesday, suggesting at a Cabinet meeting that the U.S. could cut off foreign aid for countries that opposed the U.S. in the vote.

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

The General Assembly vote came days after the U.S. vetoed a similar resolution in the U.N. Security Council. The panel's other 14 members voted in favor of that measure, a move that Haley called an "insult" to the U.S.

Shortly after the Security Council vote, Arab and Muslim leaders at the U.N. called for an emergency special session of the General Assembly to discuss America's Jerusalem decision.

In a defiant speech ahead of the General Assembly vote on Thursday, Riyad al-Maliki, the Palestinian foreign affairs minister, cast the Trump administration's Jerusalem decision as an affront to regional peace and security that has isolated the U.S. from the international community.

"Does the United States not wonder why it stands isolated in this position?" he asked.

In a blunt response, Haley warned the international body that the U.S. would remember the betrayal by the U.N., and that the vote would do nothing to affect the Trump administration's decision to recognize Jerusalem as Israel's capital and move its embassy there.

"America will put our embassy in Jerusalem. That is what the American people want us to do, and it is the right thing to do," she said ahead of the vote. "No vote in the United Nations will make any difference on that. But this vote will make a difference in how Americans view the U.N."

Trump's decision earlier this month to recognize Jerusalem as the capital of Israel was widely condemned by other world leaders, particularly in Arab and Muslim-majority countries, who warned that the move threatened to undermine stability in the region.

The move also threatened to derail future peace talks between Israelis and the Palestinians, and potentially diminished Washington's role in them.

Trump has vowed to broker negotiations between the Israelis and Palestinians, which he has called the "ultimate deal." But Arab and Muslim leaders have said his Jerusalem decision essentially disqualifies the U.S. from being the broker of such peace talks.

Israel has long considered Jerusalem its capital, and the city is the country's seat of government. The Palestinians have aspired for decades to establish the capital of a future Palestinian state in the city's eastern sector.

The U.S. and the international community have historically remained neutral on the matter and said the status of Jerusalem would have to be resolved in peace talks.

In making his announcement on Jerusalem earlier this month, Trump cautioned against perceiving the move as the U.S. taking a side on boundaries in peace negotiations and said the U.S. would still support a two-state solution.

- This story was updated at 1:15 p.m.