The Scottish government has said it will appeal after being ordered to reveal whether it holds legal advice on the status of an independent Scotland within the EU.
Labour MEP Catherine Stihler made an FoI request last May, asking the Holyrood administration for any legal advice it had received on the issue.
Ministers refused to reveal whether the information was held.
But Scotland's FoI Commissioner ruled its release was in the public interest.
Rosemary Agnew, the country's Freedom of Information Commissioner, said: "In the commissioner's view, the role of [the FoI Act] is important not only in ensuring transparency in information held by public authorities, but also in enabling transparency in information about process."
Ms Agnew said an independent Scotland's position in the EU "could have a bearing on how people vote in the referendum".
She ruled: "In this case, the commissioner considers that it is in the public interest to know the type of information that the ministers were taking into account in developing policy in relation to such a significant issue as independence.
The Scottish government cited Section 18 when it refused to reveal whether the information was held. This can mean the information would be exempt from release or the authority considers its release would not be in the public interest.
The Labour Party said that in October 2011, Culture Secretary Fiona Hyslop wrote to Ms Stihler saying that "we consider that to reveal whether or not the information you have requested exists, or is held by the Scottish government, would be contrary to the public interest".
However, following Ms Agnew's ruling, ministers have until 21 August to reveal the information.
A spokesman for the Scottish government said it had been "surprised" by the commissioner's decision.
He added: "It is the longstanding and usual practice of the Scottish government to neither confirm or deny the existence or the content of legal advice.
"The approach we have taken on this issue is consistent with the UK government position in a similar case they dealt with under equivalent legislation. We therefore intend to appeal and contest the decision."
Ms Stihler described it as "a landmark judgement".
She added: "People have a right to know whether an independent Scotland would be part of the EU and on what terms, but the SNP want to keep it secret.
"By refusing to confirm or deny, Alex Salmond effectively took out a superinjunction against the people of Scotland.
"Now the Information Commissioner has ordered him to own up. She has ruled that approach is in breach of the law, which is a groundbreaking and welcome decision."
A Scottish government spokesman said: "We have received the decision and are considering its terms."