HOLYROOD leaders have spent the last year lobbing criticism at Donald Trump, but his victory has forced the same MSPs to start changing their tone.

Trump, by dint of his misogyny and anti-immigrant rhetoric, has been a Scottish Parliament punch bag since he launched his divisive campaign for the White House.

In December, First Minister Nicola Sturgeon responded to his call for a ban on Muslims entering the US by stripping him of an ambassadorial role for Scotland he had held for nearly a decade.

Weeks later, her predecessor Alex Salmond supported proposals to stop the then-Republican primary candidate from entering the UK.

Trump, who is half-Scottish, also featured prominently in the Holyrood campaign. He was the butt of every leader’s jokes during BBC interviews and Sturgeon told a television audience she hoped he would be sent “packing”.

Hostilities continued during the presidential face-off, with Scottish Labour leader Kezia Dugdale campaigning for Hillary Clinton in the final days of the campaign and Sturgeon endorsing the veteran Democrat.

However, as the results trickled through on Wednesday morning, the same leaders realised that the joke figure dismissed as a “man child” by Salmond had won. Scotland’s political class bet its life savings on Clinton and lost.

Why does this matter? In 2014, £3.9bn worth of goods were exported to US, Scotland’s biggest market outside the UK. Two of the biggest business groups – the CBI Scotland and the Chambers of Commerce – both stressed the economic importance of the US to Scotland.

Trump has also had a dreadful relationship with Scottish Ministers. It is doubtful, perhaps with the exception of Mexico, whether Trump has a poorer personal relationship with any government than he does with the Edinburgh administration.

Much of the ill-feeling relates to niggly spats between Trump and Salmond over the tycoon’s golf course in Aberdeenshire. He wanted plans for off-shore wind turbines to be cancelled and sued the Government when Salmond did not comply.

However, nobody at Holyrood expects Trump to punish Scotland for the criticism levelled in his direction. Dealing with Vladimir Putin and Islamic State will be in his in-tray.

Professor Phillips O’Brien, who is based at the School of International Relations at St Andrews University, said: “Will Trump be probably a little miffed at Salmond and Sturgeon? Yes. Will it make any real difference with how Scotland is treated by the United States? No.”

On independence, O’Brien said: “I don’t think [a Trump White House] could be any less supportive of independence than the Obama administration was.

“In general terms, Brexit makes the United Kingdom less valuable to the United States.they would be less bothered by it [independence] than they would have a few years ago.”

Holyrood sources believe Scottish political leaders should also reflect on their interventions during foreign election campaigns.

Trump’s comments on Muslims undermined his status as an “ambassador” for Scotland and Sturgeon had widespread support to act.

Calling out bigotry is also judged to be a political must and nobody is pulling up Sturgeon, Kezia Dugdale or Ruth Davidson for tackling Trump’s sexism and racist comments. However, there is a distinction between expressing legitimate concern and interfering in another country’s democracy.

Some senior Holyrood figures believe Sturgeon made a mistake by endorsing Clinton, others argue that Dugdale should not have campaigned overseas.

A Tory source said: “Would Scots be happy for US politicians to start endorsing candidates in UK or Scottish elections? Would it be okay for Republicans to come over here and phone bank for Ruth?”

John Peterson, professor of Politics at Edinburgh University, said: “If I was advising either of them, I would have told them ‘not a good idea’. You've got to stay neutral because you might have to deal with the other guy.”

He added: “I think it is a bad idea ever to take a side in a democratic election, because you cannot predict a result.”

On Wednesday, realism set in. Sturgeon, who said in April that US voters would “dinghy” Trump, was now more constructive: "While this is not the outcome I hoped for, it is the verdict of the American people and we must respect it. I congratulate President-Elect Trump.”

Davidson, who had also poked fun at Trump, also changed her tune: "Mr Trump tapped into the disaffection we are seeing across the world right now due to economic uncertainty. That's not something we can ignore.”

Even Salmond, who said before the election that Trump was a "real and present danger to the security of the American republic”, was now saying his foe should be “given a chance”.

Scotland has looked nervously across the Atlantic before. In 2009, the Government was criticised by the Obama administration and Congress after releasing the man convicted of the Lockerbie bombing.

Despite the public spat, Obama’s press spokesman said relations with Scotland would not suffer and the reset button was hit immediately.

A test will be when President Trump visits the UK on a state visit and arranges a golf detour in Aberdeenshire. Sturgeon will be under pressure to “dinghy” the man she had previously denounced.

But, as SNP sources admit, the First Minister’s job is to stand up for Scotland’s national interest. If Ministers can meet officials in the Chinese and Russian governments, why should Trump be any different?

Peterson said: “I would expect him [Trump] to come over here...because he likes to point to his Scottish ancestry as something he is proud of, and which gives him an international profile. And it is going to put Nicola in a very difficult position.”

Sturgeon will have to walk a fine line between principle and realpolitik while ‘The Donald’ fulfills his mandate.