The Scottish Government has threatened to invoke formal dispute resolution procedures with the UK Government as the row over the Tories' £1bn deal with the Democratic Unionist Party (DUP) intensified.

Political leaders in Scotland and Wales reacted furiously to the agreement, which will see Northern Ireland benefit from additional cash while Theresa May will gain the support of DUP MPs in crucial votes at Westminster.

First Minister Nicola Sturgeon tweeted the deal saw "any sense of fairness sacrificed on the altar of grubby DUP deal to let PM cling to power," while her counterpart in Wales Carwyn Jones described the deal as a "straight bung" to prop up a "faltering" Conservative minority government.

Meanwhile, Scottish finance secretary Derek Mackay told MSPs at Holyrood the Conservatives were "ripping off Scotland to the tune of £2.9bn".

Mr Mackay claimed it is "unacceptable" the funding for Northern Ireland will not be subject to the Barnett formula's spending rules, which determine how resources are allocated to different parts of the UK.

Increased spending on devolved issues, such as health and infrastructure, for one part of the country will usually result in additional money for other areas.

Mr Mackay is demanding urgent talks with Liz Truss, chief secretary to the Treasury, and Welsh finance secretary Mark Drakeford in a bid to find a "satisfactory solution" that is "fair and reasonable to all".

In a letter to Ms Truss, he stated: "As this is an issue of such significance to the Scottish Government, if we cannot agree we will look to pursue a more formal mechanism to resolve the situation by invoking the formal dispute resolution mechanism."

Answering questions on the issue in the Scottish Parliament, Mr Mackay said he had first raised his concerns with Ms Truss a week ago but had been given "no reassurances whatsoever" on potential funding for Scotland.

He told MSPs: "If this matter cannot be resolved with HM Treasury, then we will invoke formal dispute resolution proceedings to ensure that this matter is resolved.

"The UK Government's deal prioritises expenditure on Northern Ireland at the cost of all other parts of the UK and leaves Scotland almost £3bn worse off than it would be if funding had been allocated using the well-established arrangements.

"We don't grudge Northern Ireland a penny - we just want fairness for every other part of the UK, not least in Scotland."

Mr Mackay dismissed suggestions the funding for Northern Ireland was similar to city deals - to which the Barnett formula does not apply.

The additional funding being delivered for Northern Ireland falls within devolved areas such as infrastructure, health and education - all of which are within the scope of the Barnett formula.

The DUP agreement has been backed by the Scottish Conservatives, despite Scottish secretary David Mundell previously claiming he would not support a funding deal "which deliberately sought to subvert the Barnett rules".

A UK Government spokesman insisted the deal was a "targeted intervention" to address a "specific set of unique challenges".

He added: "It is not unprecedented, the UK Government has always been able to provide funding outside of Barnett."