JACK McConnell threatened UK ministers with a blazing public row about the cost of policing the G8 summit in Gleneagles if they did not pay for it all, newly released archives have revealed.

The Labour first minister said that if Whitehall refused to cover the costs it would place the Scottish Executive “in an intolerable position, which it would feel obliged to explain publicly”.

However UK ministers repeatedly ignored Mr McConnell and he backed down, leaving Scots taxpayers with the lion’s share of a £72 million bill.

Despite telling MSPs he had no problem sharing the cost, in private Mr McConnell wrote to the then Labour chancellor Gordon Brown and then prime minister Tony Blair saying the UK Government should pay “in full”.

Mr McConnell admitted to his cabinet that the difficulty he faced revealed the state of “relations between the UK Government and Scottish ministers”.

One of his ministers described the G8 as a double-edged sword because the SNP could “claim that the prime minister has foisted a poisoned chalice on Scotland”.

Despite the behind-the-scenes fight, Mr McConnell would later mock the SNP for fretting about the potential for “the odd penny to go astray” over the G8.

The dispute between the Scottish and UK governments is contained in Scottish cabinet papers released today by the National Records of Scotland.

In May 2004, Mr McConnell told his cabinet that he had written to the chief secretary to the treasury, then Paul Boateng, “seeking assurances that Whitehall would meet the costs of providing security” if, as expected, the gathering of world leaders was held at Gleneagles in 2005.

The cabinet minute went on: “If not, the first minister intended to make it clear publicly that no guarantee had been given.”

The following month, the day before Tony Blair confirmed the G8 would be at the Perthshire resort, the first minister told his cabinet he had still not received assurances the Treasury would meet the security costs “despite several approaches at ministerial level”.

The cabinet minute said Mr McConnell’s view was that “the body whose decisions lead to the additional cost would normally cover that cost” and the Scottish Executive “expected this agreement to be honoured in this case”.

However he admitted it “had been difficult to engage UK ministers and Whitehall officials on the importance of this issue and of what it revealed about relations between the UK Government and Scottish ministers”.

By December 2004, the policing bill was estimated at between £70m to £100m, but the Treasury had only offered to meet 25 per cent of it.

A group of ministers working on the G8, led by finance minister Tom McCabe, submitted a report to cabinet on the summit.

This admitted that, despite being touted as an economic boon, “the commercial benefits of the summit for Scottish companies were likely to be fewer than anticipated [as] sponsorship levels had been set very high”.

However the Scottish Executive’s “major concern” was the “significant police and security costs”.

This covered protests at the summit and elsewhere across Scotland, riot training and equipment, security vetting, security fencing, IT, communications kit, surveillance, accommodation, transport and catering for up to 15,000 officers, security associated with spouse visits around Scotland and air support, including two helicopters.

The UK Government was paying for hiring the five-star hotel and other logistical arrangements.

The report said Mr McConnell’s “stated position from the outset (made clear in correspondence sent to the chancellor of the exchequer and the prime minister) is that the UK Government should meet the additional policing and security costs in full, since the G8 summit is a reserved matter.

“The chief secretary has so far offered a 25 per cent contribution towards these costs. He argues that the Executive should be able to absorb them within our assigned budget.”

Mr McCabe’s report went on: “The summit is a fantastic opportunity for Scotland. To some extent, we might want to make the case that it is only because Scotland is part of the union that we have this opportunity.

“However, I appreciate that this is a double-edged sword because opponents could claim that the prime minister has foisted a poisoned chalice on Scotland.

“Indeed, elements in the Opposition have consistently opposed the summit and are taking every opportunity to argue that it is bad for Scotland. That opposition is bound to become more vociferous as we get close to the summit.”

In person, Mr McCabe also told the cabinet the police bill was “potentially a very serious situation as the costs associated with the summit will inevitably be in the public domain.”

They could also “escalate if there were problems... or an emergency arose”.

He said he would meet Mr Boateng in January 2005 and if there was not sufficient progress on costs “Cabinet would need to consider the consequences of the various options, including a major public dispute with UK Government”.

He went on: “The first minister had made it clear to senior members of the UK Government that failure to reach agreement on the policing and security costs would place the Executive in an intolerable position which it would feel obliged to explain publicly.”

The cabinet “noted the seriousness of the situation in relation to the policing and security costs” and asked Mr McCabe to report back after his meeting with Mr Boateng. The record of that meeting has yet to be released, but it is clear there was little progress, as the UK Government only gave the Executive a flat £20m towards the policing bill.

In May 2005, Nicola Sturgeon challenged Mr McConnell over the bill at First Minister’s Questions, demanding to know how much the total would be and who would pay it.

Mr McConnell said it would be “nowhere near £100m” and the G8, besides discussing important issues like Africa and climate change, would showcase Scotland to the world.

He said: “The Scottish National Party’s ability to revert to an introverted, insular and inward-looking position and to be concerned about any potential for the odd penny to go astray in Perth and Kinross Council or Angus Council is depressing for Scotland.”

The summit saw days of anti-G8 protests across Scotland, including fierce clashes with police in Edinburgh,

When the final policing bill was put at £72m in December 2005, with the Scottish Executive picking up £52m of it, the SNP said it showed Westminster had “dumped the cost on Scotland”.

The Executive claimed it had “always made it clear... there would be some costs... which we would meet and that the Treasury would also contribute”.