Both the Cabinet Office and the Scotland Office told The Scotsman it would cost too much to answer freedom of information requests on the topic of legal advice.
The Scottish Government has less than a week to publish its advice around the legality of a second independence referendum in order to abide by the decision by the Scottish Information Commissioner.
Ministers were told to publish the advice by June 10 following a 13-month transparency battle with The Scotsman.
Nicola Sturgeon has repeatedly said she will legislate for a second independence referendum to take place in 2023 and the government has committed £20m of their budget to pay for a referendum next year.
However, legal experts disagree on whether the Scottish Parliament has the power to legislate for a referendum, with many expecting a legal battle with the UK Government once a referendum bill is passed by MSPs.
In his ruling, Scottish information commissioner Daren Fitzhenry said the Government’s decisions during the Alex Salmond inquiry and the “obvious” and “significant” public interest around a second independence referendum meant parts of the legal advice should be released.
Before the election in May last year, the SNP was also forced to release legal advice relating to their doomed defence against the judicial review brought by the former first minister, Mr Salmond, only doing so after the threat of a no-confidence motion in deputy first minister John Swinney.
This decision, Mr Fitzhenry said, demonstrated ministers recognised there could be “compelling public interest reasons for disclosure of legal advice”.
Despite this, the Cabinet Office refused to answer the question whether the UK Government had sought legal advice on indyref2.
The department was asked “whether the UK Government has sought legal advice around a potential second independence referendum in Scotland”.
In response to the yes or no question, officials said: “We consider your request would exceed the cost limit primarily because of its broad time period. Part one of your request has no specified time period.”
The Scotland Office, which was asked the same question and also asked for internal correspondence between civil servants and ministers in 2021 and 2022, also claimed it would cost too much to answer due to the lack of a timeframe.
A spokesperson for the department said: “These particular requests were so broad that it would exceed the cost limit (as set down in regulations) to determine what, if any, information the Scotland Office holds.
"If the requestor chooses to submit a further request, we will, of course, consider it in the usual way.”
The Scottish Government declined to comment on the response by the UK Government and said it would respond to the decision by the information commissioner in due course.
The First Minister’s official spokesperson has previously defended the right of the UK Government to keep their legal advice around the Northern Ireland protocol secret.
The SNP did not respond to requests for comment.