The UK Government has confirmed it will pay up to £5m to cover the bill for a huge police operation if Donald Trump visits Scotland later this month as expected.
Justice Secretary Humza Yousaf wrote to Home Secretary Sajid Javid after it emerged a US presidential visit could require more than 5,000 officers.
Responding to the letter, Chief Secretary to the Treasury Liz Truss said: "The final details of the President's visit to the UK, including Scotland, are still to be confirmed.
"As you are aware, policing is a devolved matter in Scotland.
READ MORE: When will Donald Trump visit the UK, will he come to Scotland and what can we expect?
"However, on an exceptional basis, I can confirm that the Treasury would provide ring-fenced funding of up to £5 million to cover the costs incurred by Police Scotland should a visit by the President be confirmed."
Last week, Police Scotland interim Chief Constable Iain Livingstone told the Scottish Police Authority board contingency planning was under way for a visit, with rest days cancelled and shifts changed for many police officers.
He said that even without an appearance from Mr Trump north of the border, planned demonstrations and protests across the country will have significant implications for policing resources.
Concerns had been raised over how the costs would be met given the force's £35 million budget deficit. Mr Trump is due to make his first presidential trip to the UK after attending the Nato summit in Brussels on July 11 and 12.
The White House and Downing Street have confirmed he will hold talks with Theresa May on Friday July 13, but other details are still being worked out.
There has been speculation the president, who owns two golf resorts in Scotland, could extend his stay in order to play on one of his courses.
READ MORE: Donald Trump St Andrews: US President’s secret attempts to buy landmark hotel
Anti-Trump protests have been arranged in Edinburgh and Glasgow to coincide with the visit. Mr Livingstone said the president could be in Scotland between July 12 and 15.
Maurice Golden MSP, the Scottish Conservative chief whip at Holyrood said: “No doubt the SNP will be delighted at yet another example of the union dividend.
“Even though policing is devolved to Holyrood, it’s welcome that the UK Government is willing to cover the costs of any potential visit from the US president.
“That’s the right thing to do, and allows Police Scotland to concentrate resources on fighting crime and keeping communities safe.”