The UN General Assembly has decisively backed a resolution effectively calling on the US to withdraw its recognition of Jerusalem as the capital of Israel.
The text says that any decisions regarding the status of the city are "null and void" and must be cancelled.
The non-binding resolution was approved by 128 states, with 35 abstaining and nine others voting against.
It came after US President Donald Trump threatened to cut financial aid to those who backed the resolution.
Following the vote, state department spokeswoman Heather Nauert said the US was exploring "various options" and no decisions had yet been made.
How did UN members vote?
- The nine who voted against the resolution were the US, Israel, Guatemala, Honduras, the Marshall Islands, Micronesia, Nauru, Palau and Togo
- Among the 35 abstaining were Canada and Mexico
- Those voting in favour included the other four permanent members of the UN Security Council (China, France, Russia and the UK) as well as key US allies in the Muslim world
- There were 21 countries who did not turn up for the vote.
What is so contentious about Jerusalem's status?
The status of Jerusalem goes to the heart of Israel's conflict with the Palestinians.
Israel occupied the east of the city in the 1967 Middle East war and regards the entire city as its indivisible capital.
The Palestinians claim East Jerusalem as the capital of a future state and its final status is meant to be discussed in the latter stages of peace talks.
Israeli sovereignty over Jerusalem has never been recognised internationally, and all countries currently maintain their embassies in Tel Aviv. However, President Trump has told the US state department to start work on moving the US embassy.
What does the UN resolution say?
The 193-member UN General Assembly held the rare emergency special session at the request of Arab and Muslim states, who condemned Mr Trump's decision to reverse decades of US policy earlier this month.
The Palestinians called for the meeting after the US vetoed a Security Council resolution that was similar to the text approved on Thursday.
The text put forward by Turkey and Yemen does not mention the US, but expresses "deep regret at recent decisions concerning the status of Jerusalem".
It also says "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".
What do Israel and the Palestinians say?
Israel's Prime Minister Benjamin Netanyahu had promised to reject the results of the vote, calling the UN a "house of lies".
Afterwards he said in a statement: "Israel thanks President Trump for his unequivocal position in favour of Jerusalem and thanks those countries that voted alongside Israel, alongside the truth."
A spokesman for Palestinian President Mahmoud Abbas called the vote "a victory for Palestine".
How does the US see it?
In a speech before the vote, US permanent representative Nikki Haley stressed that the US decision did not prejudge any final status issues, and did not preclude a two-state solution if the parties agreed to that.
"The United States will remember this day, on which it was singled out for attack in the General Assembly for the very act of exercising our right as a sovereign nation," she said.
"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. No vote in the United Nations will make any difference on that."
On Wednesday, Mr Trump warned he might cut financial aid to states who voted in favour of the resolution.
"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," he added. "Let them vote against us. We'll save a lot. We don't care."
Will Trump act in retaliation?
Analysis by Sebastian Usher, BBC Arab affairs analyst
The result of the UN General Assembly vote was inevitable: the US knew that the majority of states would vote for the resolution. But there may have been slightly more abstentions and votes against than had been expected - which will be some comfort to the Trump administration.
There's little surprise in the countries that voted against - the likes of Micronesia, Nauru and Togo had nothing to gain from voting against the interests of the US, which helps support them.
Canada, Mexico and Poland were amongst those that abstained, in a move that will do nothing to harm their relations with the US.
The votes for the resolution from powerful US allies, such as France, Germany and the UK, could be seen as a slap in the face for President Trump - but all would argue that they simply voted in line with the existing status quo at the UN. There was no pressing reason for them to switch from this stance.
But the real test of the vote will be whether the Trump administration acts on its threats to reconsider financial aid to some of those who backed the resolution. Key, too, will be whether the resolution will give fresh impetus to the protests against the US decision that have been going on ever since it was announced, but have yet to really catch fire.