Lawyers for the Foreign Office have succeeded in overturning a coroner's ruling that secret documents should be released for the inquest into the death of the former Russian dissident and KGB spy Alexander Litvinenko.

In a unanimous decision, three judges at the high court accepted that the foreign secretary, William Hague, should not have to reveal material relating to the 2006 poisoning of Litvinenko on the grounds that it would be a risk to national security.

Litvinenko, 43, consumed radioactive polonium-210 while drinking tea during a meeting with former Russian security colleagues at the Millennium hotel in Grosvenor Square, central London. He died three weeks later.

In May this year, the assistant coroner Sir Robert Owen agreed to exclude material from the inquest that suggested Russian state agencies were involved in Litvinenko's death. He also agreed to keep secret evidence that considered whether or not the UK authorities could have prevented Litvinenko's 2006 murder.

But he said summaries of other documents should be disclosed despite an application by the Foreign Office that they should all be subject to a public interest immunity (PII) certificate. The coroner ruled that disclosure was necessary for a "fair and meaningful" inquest.

In Wednesday's judgment, however, Lord Justice Goldring said: "The coroner did not really explain the reasoning which drove him to decide that the need for 'a full and proper inquiry' outweighed the real risk of damage to national security.

"There is nothing to suggest he had in mind such observations [by senior judges] to the effect that it would be very rare for a court, especially regarding such issues as national security, to question the view of the secretary of state that disclosure would be contrary to the public interest … The weight the coroner gave to the views of the secretary of state was insufficient and amounted to an error of law.

"It was clear that the narrative of the inquest would be adversely affected by non-disclosure, although that could to some extent be ameliorated. Although this is not satisfactory, the essential issue is not whether or not the process of the inquest would be prejudiced by non-disclosure; plainly it would be. The question is whether that prejudice outweighs the real risk of significant damage to national security."

The Guardian and other media groups had intervened in the case at an earlier stage to argue that open justice would be damaged if relevant material was not released.

There is due to be a pre-inquest review on Friday to prepare for further hearings if there is to be no public inquiry.

In response to the high court ruling, Owen said he would "reflect carefully on the detail of today's judicial review PII judgment", hear submissions on Friday on the scope of the inquest and "in due course … make a ruling".