Canada abstained from a contentious United Nations vote Thursday that delivered a resounding rebuke to Donald Trump over his decision to move the U.S. embassy from Tel Aviv to Jerusalem.

The UN General Assembly voted 128-9 in favour of a resolution declaring the U.S. president's recognition of Jerusalem as the Israeli capital to be null and void.

Thirty-five countries, including Canada, abstained.

The vote placed Canada in a difficult situation because Trump had threatened to retaliate against countries that supported the resolution.

Shortly before the vote, a spokesman for Foreign Affairs Minister Chrystia Freeland confirmed that Canada would abstain and said the Canadian government was disappointed the resolution had landed on the floor of the General Assembly.

"This resolution is one-sided and does not advance prospects for peace to which we aspire, which is why we will abstain on today's vote," Adam Austen said.

"Canada's long-standing 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."

Austen said Canada wants to emphasize that Jerusalem has special significance to Jews, Muslims and Christians.

"Denying the connection between Jerusalem and the Jewish, Muslim and Christian faiths undermines the integrity of the site for all. We also reiterate the need to maintain the status quo at Jerusalem's Holy sites."

Freeland discussed the issue with U.S. Secretary of State Rex Tillerson during a meeting Tuesday on Parliament Hill, after which she suggested they had agreed to disagree.

"Canada and the United States have different views on issues and I think that we have a strong enough relationship — both our two countries and Rex and I personally — that we're able to be candid about those differences and explain them to one another," said Freeland, standing next to Tillerson.

Canada and the U.S. are currently locked in a tough renegotiation of the North American Free Trade Agreement with a protectionist Trump administration, but that shouldn't influence how it votes on the Jerusalem vote at the UN, said Bessma Momani, a senior fellow and Middle East expert with the Centre for International Governance and Innovation.

"Canada may find itself in a tough position as we try to renegotiate a NAFTA deal, but we should stand with the international community and wider expert opinion that the U.S. move is unnecessary, counterproductive, and toxic," she said.

"Moreover, there's power in a collective response against Trump and we should take comfort in that."

— with files from The Associated Press

Keep reading