The UN General assembly voted on Thursday 128 for, 9 against with 35 abstentions on a non-binding resolution calling on the US to rescind its 6 December decision to recognise Jerusalem as Israel's capital.
The 193-nation assembly voted on a draft resolution reaffirming that Jerusalem is an issue that must be resolved through negotiations and that any decision on its status must be rescinded.
Egypt had put forward a draft resolution at the UN Security Council, which was vetoed by the United States but backed by all 14 other Council members in a vote on Monday.
Like the Egyptian draft, the text before the assembly did not mention Trump's decision, but expressed "deep regret at recent decisions concerning the status of Jerusalem."
Representatives of member states delivered short statements on the motion, overwhelmingly against the US move.
Palestinian Foreign Minister Riyad Al-Malki told the assembly that "the United states cannot violate international law," and described Jerusalem as the "key for both peace and war" in the Middle East.
Al-Malki said that Israel "does not hide its policies and intentions", accusing it of "killing the dreams of the Palestinians" and criticised the United States for supporting its actions.
The top Palestinian diplomat said there will be no separation between the "Palestinian people, land and history."
Palestine was admitted as an observer member of UN General Assembly in 2012.
Turkey's Foreign Minister Mevlut Cavusoglu said that "a vote in favour of Palestine will place us on the right side of history."
Nikki Haley, the US representative at the UN, told the assembly that the US was "singled out for attack" at the United Nations because it now recognises Jerusalem as the capital of Israel, and again threatened to cut off aid to countries that vote against the decision.
“The United States will remember this day in which it was singled out for attack in the General Assembly for the very act of exercising our right as a sovereign nation," Haley said at the General Assembly ahead of the vote.
Israel's representative told the assembly that his country will never leave Jerusalem.
"Those who support the resolution are puppets and marionettes," he added.
Pakistan’s representative told the assembly that "my delegation believes the US veto [of the Security Council resolution] earlier this week represents a dangerously misplaced strategy."
The UN representative of Indonesia spoke against Trump's decision and in favour of negotiations and a two-state solution to resolve the Israeli-Palestinian conflict, saying his country's "support for the Palestinian people will never cease."
The Venezuelan representative opposed the US decision on Jerusalem and Trump's threats to punish those countries that oppose his decision, saying "the world is not for sale."
The representative of Estonia said a two-state solution would meet the aspirations of both Israelis and Palestinians and lead to peace.
The representative of Australia said her country does not support any unilateral decision that would hamper negotiations and called on the US to continue in its efforts to mediate a peace solution.
Under a 1950 resolution, an emergency special session can be called for the General Assembly to consider a matter "with a view to making appropriate recommendations to members for collective measures" if the Security Council fails to act.
Israel seized control of the eastern part of Jerusalem in the 1967 Middle East war and annexed East Jerusalem in 1980, a move that has never been recognised by the international community.
The Palestinians have long demanded occupied East Jerusalem for the capital of their future state.
Peace negotiations between the Palestinian authorities and Israel – which have lasted for more than two decades based on the 1993 Oslo accords – have been stalled since 2014.
There are an estimated 4.3 million Palestinians who live in the occupied territories; two million in Gaza, two million in the West Bank and 325,000 in East Jerusalem.
In recent years, Israel has intensified the construction of hundreds of illegal Jewish settlements in occupied East Jerusalem and the West Bank, thus creating new demographics that weaken the ability of the Palestinians to build a geographically contiguous state.
Over the past 50 years, the US has repeatedly vetoed resolutions that condemn Israeli occupation, aggression or illegal settlement construction.