The UK supreme court has cleared the way for the publication of secret letters written by Prince Charles to British government ministers, declaring that an attempt by the state to keep them concealed was unlawful.
The verdict – the culmination of a 10-year legal fight by the Guardian – is a significant blow for the government, which has been battling to protect the Prince of Wales from scrutiny over his “particularly frank” interventions on public policy.
In 2012, Dominic Grieve, then attorney general, said the correspondence contained the prince’s “most deeply held personal views and beliefs” and disclosure might undermine his “position of political neutrality”, which he might not easily be able to recover when king.
The 27 letters were sent between Charles and ministers in seven government departments in 2004 and 2005. Five of the seven judges in the supreme court ruled in favour of the Guardian’s case to see the letters. The verdict was delivered on Thursday by Lord Neuberger, the president of the court.
Related: The Guardian view on the black spider memos: a victory for the rule of law, a warning to Prince Charles | Editorial
The judges concluded that Grieve did not have the legal power to veto a freedom of information tribunal, which had decided the memos should be published.
In a statement read out in court one of the supreme court in Westminster, Neuberger said: “We dismiss the attorney general’s appeal and the decision of the upper tribunal that the advocacy correspondence should be disclosed under the Freedom of Information Act … stands.”
The prime minister and a spokeswoman for Charles said they were disappointed that the ruling had challenged the principle that senior members of the royal family were able to express their views to government confidentially.
The anti-monarchy campaign group Republic predicted that the eventual publication of the letters might swell republican support by revealing the royals “as a serious political force rather than as apolitical and harmless”.
Downing Street said it would have to do “preparatory work” before releasing the correspondence and appeared not to rule out making redactions.
Cameron’s deputy official spokesman made clear that there would be no more appeals against the judgment but that other similar FOI requests would continue to be fought.
“The steps now in terms of this specific case is that these letters will be published,” she said. “The prime minister has been very clear this morning it is a deeply disappointing judgment. He doesn’t agree with it. He thinks what’s at stake here is an important principle about the ability of senior members of the royal family to express their views to government confidentially.
“He thinks that’s a principle that we should uphold. So while we have taken steps in this parliament to strengthen the ability to do that through the FOI act, if there needs to be more done to make that clear, then the prime minister is clear those steps should happen in the next parliament.”
Asked whether this means changing the law, she said: “We will now need to study the judgment in detail and look at this.”
Pressed on whether there could be redactions, she added: “It’s only an hour after the judgment and we will have to study it. It is to look at what information will be released and the best way to do that ... what we will be doing is complying with the judgment of the court but we will need to study and look at the best way in which to do that ... I don’t think it’s that surprising there will be discussion about the way that it is done. That’s why there has been some time set by the court in order to allow that process to happen.”
Cameron said: “This is a disappointing judgment and we will now consider how to release these letters. This is about the principle that senior members of the royal family are able to express their views to government confidentially. I think most people would agree this is fair enough.”
He added: “Our FOI laws specifically include the option of a governmental veto, which we exercised in this case for a reason. If the legislation does not make parliament’s intentions for the veto clear enough, then we will need to make it clearer.”
Prince Charles’s office said: “Clarence House is disappointed that the principle of privacy has not been upheld.” A royal aide said Clarence House was relatively relaxed about the imminent publication of the letters themselves and noted that the judgment was not based on the content of the letters, but on the principle of the separation of powers.
The palace is understood to be more concerned that the broader principle of privacy in communications between the Prince of Wales and ministers has not been upheld.
Paul Flynn MP, a Labour member of the commons political and constitutional reform committee, said the ruling could increase public demand for the crown to be passed straight to Prince William when the Queen dies.
“This opens up a much bigger issue,” he said. “If there are serious questions about the suitability of Prince Charles as a monarch there could be a question in the public mind about whether to skip a generation. The attorney general already said the main justification for keeping the letters secret was they would hinder Charles’s ability to be a successful monarch.”
In 2012, the tribunal ruled that the correspondence between the prince and ministers in Tony Blair’s government should be made public. The tribunal said it was in the public interest “for there to be transparency as to how and when Prince Charles seeks to influence government”.
Grieve overruled the tribunal, arguing that publication of the letters between September 2004 and April 2005 would seriously damage the Prince of Wales’s kingship.
Delivering the verdict, Neuberger said it was not reasonable for Grieve to issue the veto “simply because, on the same facts and admittedly reasonably, he takes a different view from that adopted by a court of record after a full public oral hearing”.
He added: “There is no clear or specific suggestion anywhere in the [Freedom of Information Act] that it is intended that [a veto] should enable a member of the executive to over-ride a judicial decision.”
Neuberger concluded: “[Grieve] proceeded on the basis of findings which differed radically from those made by the upper tribunal without real or adequate explanation.”
Lord Wilson and Lord Hughes each gave dissenting judgments on the issue and believe that Grieve was entitled to veto the court’s decision.
Graham Smith, chief executive of Republic, welcomed the ruling and said: “The law now needs to change so future requests [to see royal correspondence with ministers] should be successful. The court has defended democratic principles over the interests of the royal family and that needs to be enshrined in law. David Cameron’s response is worrying because he says he wants to tighten up the veto.”