New Zealand has voted to condemn the United States' decision to recognise Jerusalem as Israel's capital.
An overwhelming majority of 128 member states supported the resolution at an emergency general assembly meeting, despite threats that the US would cut aid to any state that did so.
Just nine member states, including the US and Israel, voted against the resolution.
There were 35 abstentions, including Australia, Fiji, Vanuatu and the Philippines.
The resolution expressed deep regret over the recognition of Jerusalem as Israel's capital, and demanded "all states comply with Security Council resolutions regarding the Holy City of Jerusalem, and not recognise any actions or measures contrary to those resolutions".
It stated 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".
The emergency general assembly was called after the US vetoed the resolution at the Security Council, while every other member supported it.
Speaking ahead of the vote on Thursday, Prime Minister Jacinda Ardern said New Zealand would not be influenced by US President Donald Trump.
"We have always supported a two-state solution, we will continue to hold our position based on principle, regardless of what any other nation says," she said.
"We make our own choices, we take our own position, and we've stood up to people before when they've had a different view - you only need to look at things like nuclear free."
National foreign affairs spokesperson Gerry Brownlee said "We would have supported the UN General Assembly resolution but that does not mean we have a particular view in favour of one party over the other."
Mr Brownlee said New Zealand has consistently supported a two-state solution and the vote reflects that.
"New Zealand has always maintained an independent foreign policy and has always cast its UN vote accordingly."