Media playback is unsupported on your device Media caption Haley's warning: "The United States will remember this day"

What a difference a year, and a new administration, makes. When the US ambassador to the United Nations, Nikki Haley, made her debut at the UN headquarters in New York, she warned: "For those who don't have our backs, we're taking names."

The new Trump administration came in openly hostile toward the international body for being, it claimed, biased against Israel.

It condemned a resolution that President Barack Obama let pass in the Security Council that labelled Israeli settlements a flagrant violation of international law, and Mrs Haley made clear that things were going to be different.

Nearly a year later, the 193 members of the UN learned exactly what Mrs Haley meant that first day.

Ahead of the UN General Assembly vote criticising the Trump administration's decision to recognise Jerusalem as Israel's capital and move the American embassy there, Nikki Haley sent a terse letter to dozens of countries.

In it she said that "the president and the United States take this vote personally" and that she had been requested by Mr Trump to "report back on those countries who voted against us".

For good measure, she also took to Twitter, writing: "At the UN we're always asked to do more and give more. So when we make a decision, at the will of the American people, about where to locate OUR embassy, we don't expect those we've helped to target us."

President Trump, pleased with his assertive ambassador, added that the US would cut funding to any country that supported the General Assembly resolution.

The session on Jerusalem was always going to be a highly charged debate, but what was at stake was the passage of a symbolic, non-binding resolution. President Trump and Ambassador Haley's threat elevated the vote to a critique of his "American First" approach to foreign policy.

Media playback is unsupported on your device Media caption Why the ancient city of Jerusalem is so important

"This was an opportunity for diplomats to let off steam before Christmas," said Richard Gowan, a UN expert with the European Council on Foreign Relations.

"The Trump administration got to show its disregard for the UN, and a lot of countries got to signal their displeasure with Trump."

In the General Assembly hall, many did just that, decrying the US tactic as bullying and blackmail.

In the end, Mrs Haley was left with a long list of names - 128 countries supported the resolution and only nine voted against it. Guatemala, Honduras, the Marshall Islands, Micronesia, Nauru, Togo and Palau joined the US and Israel to reject the resolution.

But key allies of the US brushed aside Washington's warnings and supported the measure - countries such as the UK, Japan and France.

French ambassador Francois Delattre said the resolution adopted "only confirms relevant international law and provisions on Jerusalem. This vote must not divide or exclude".

Under pressure

A senior diplomat said the resolution backfired in some instances. Canada, the diplomat said, was going to vote against the resolution but changed its vote because it was unhappy with the tone the US had taken.

Mr Gowan says the US did not act strategically.

"Nikki Haley, who has a good reputation with other ambassadors for pragmatism, overreached by trying to turn this vote into a sort of loyalty test," he said.

"The US was always going to lose badly, and Haley should have worked around that more astutely. But she may have been under pressure from the White House to make as much fuss as possible."

A spokesperson for the US mission said the vote breakdown told a different story.

"It's clear that many countries prioritised their relationship with the United States over an unproductive attempt to isolate us for a decision that was our sovereign right to make," they said.

Indeed, the pressure from Washington did have a small impact.

A senior European diplomat voiced concern over the EU not being able to speak with one voice in Thursday's debate.

Media playback is unsupported on your device Media caption Trump: "We're watching those votes"

The EU wants to be seen as a unified political actor on the international stage. But some eastern European countries abstained, such as Hungary and the Czech Republic.

In fact, more countries than expected, 35 in total, abstained. The US's southern neighbour, Mexico, was one of them.

Ambassador Juan Gomez Camacho said Mexico didn't think it was useful to the peace process that a unilateral action on Jerusalem's status was taken. He added: "Nor do we believe it to be useful, and we see it as disproportionate, to convene an emergency meeting of the General Assembly."

Twenty-one countries skipped the vote altogether, including Ukraine, which had supported a similar measure that failed in the Security Council on Monday because of a US veto. Ukraine recently signed an arms deal with the US.

Punishment unclear

President Trump is also far more concerned about appealing to his political base than diplomats at the UN.

His supporters love his abrasive style and this move was certainly aimed at showing them that the US was not going to stand for criticism.

Many diplomats at the UN believe Mrs Haley was also considering her own political ambitions rather than relationships at the UN.

There are no signs yet as to what retribution those who supported the resolution might face. But for those who voted against it, abstained, or didn't attend, Mrs Haley has invited them to a reception to thank them for "their friendship" to the US.

And on Friday it was back to business as usual. In the Security Council, the ambassador thanked members for working constructively with the US to pass new sanctions on North Korea.

Just one of the many issues where the US needs the international community as much as the international community needs the US.