A controversial UN resolution against President Donald Trump's decision to recognize Jerusalem as Israel's capital has passed 128-9, with Canada among 35 countries that abstained from voting.

Before the UN General Assembly voted Thursday, Trump had threatened to punish any country that opposed him.

The assembled voted in favour of declaring "null and void" the U.S.'s recognition of Jerusalem as Israel's capital. Voting with the U.S. were Guatemala, Honduras, Israel, Marshall Islands, Micronesia, Nauru, Palau and Togo.

Thursday's vote in New York City was significantly lower than its supporters had hoped for, with many forecasting at least 150 "yes" votes out of the 193 member states.

Twenty-one countries didn't vote at all.

'We are disappointed that this resolution is one sided and does not advance prospects for peace,' says Canadian ambassador 0:55

"We are disappointed that this resolution is one-sided and does not advance prospects for peace to which we aspire, which is why we have abstained on today's vote," said Adam Austin, a spokesperson for Foreign Affairs Minister Chrystia Freeland.

"Canada's longstanding position is that the status of Jerusalem can be resolved only as part of a general settlement of the Israeli-Palestinian dispute. This has been the policy of consecutive governments, both Liberal and Conservative."

Canada's ambassador to the UN, Marc-André Blanchard, reiterated those remarks while explaining Canada's position at the General Assembly.

"We also take this opportunity to emphasize the importance of the city of Jerusalem to the three monotheistic religions. Denying the connection between Jerusalem and the Jewish, Muslim and Christian faiths undermines the integrity of the site for all," Blanchard said.

"Canada calls for calm and firmly condemns the violence, terrorism and targeting of civilians witnessed in the last weeks."

The Palestinians and their Arab and Islamic supporters sought the General Assembly vote after the United States on Monday vetoed a resolution supported by the 14 other UN Security Council members that would have required Trump to rescind his declaration on Jerusalem as Israel's capital and not move the U.S. Embassy there.

'This vote will be remembered,' says U.S. Ambassador Nikki Haley 1:21

Trump has threatened to cut off U.S. funding to countries that oppose his decision to recognize Jerusalem as Israel's capital.

"For all these nations, they take our money and then vote against us. They take hundreds of millions of dollars, even billions of dollars and then they vote against us," Trump told reporters at the cabinet meeting Wednesday. "We're watching those votes. Let them vote against us.

"We'll save a lot. We don't care," he said, alluding to U.S. aid.

Ahead of the emergency assembly meeting, U.S. Ambassador Nikki Haley said "no vote in the United Nations will make any difference" on the U.S. decision to move its embassy to Jerusalem, which will go ahead because "it is the right thing to do."

"The United States will remember this day in which it was singled out for attack in the General Assembly for the very right of exercising our right as a sovereign nation," she said.

The NDP said they're disappointed by Canada's decision to abstain.

"At a time when Canada should be standing up for international law and promoting human rights, Canada is isolating itself," said Foreign Affairs Critic Hélène Laverdière.

"We urge the Trudeau government to uphold their own stated values, condemn illegal settlements, and finally stand up for the rights of the Palestinian people as well as the rights of Israelis. Canada has been silent on these issues for far too long."