The Court of Appeal in London on Friday dismissed a challenge by a newspaper which argued it was wrong to hold in secret a hearing which decided that the will of Prince Philip, Queen Elizabeth's late husband, should be kept private.
Philip, the Duke of Edinburgh, died in April last year aged 99 after more than seven decades of marriage to the queen.
In June 2021, Andrew McFarlane, president of the High Court's Family Division, held a private hearing at which he agreed that Philip's will should be sealed and kept private for 90 years.
His judgement, in which he said publishing Philip's will would be "contrary to the aim of maintaining the dignity of the Sovereign", was made public three months later.
The Guardian newspaper appealed, arguing that McFarlane was wrong not to allow the media a chance to question whether the application to seal the will should proceed without journalists present, saying it was "disproportionate and unjustified".
The Guardian also said McFarlane was wrong to accept that the attorney general alone could speak to the issue of public interest.
The three appeal court judges said Britain's open justice system meant courts should sit in private only rarely, but the media did not have a right to make submissions about whether hearings should be held in public.
"We have, therefore, concluded that this was not a case where fairness demanded that the media be notified of the hearing or asked to make submissions before judgment," their ruling said.
However, one judge, Justice Eleanor King, while agreeing the appeal should be dismissed and that McFarlane had not been wrong, voiced concerns about whether there could have been a mechanism to allow the media to attend.
"For my own part, I believe I would have tried to find a route which would have enabled the media to be present to hear and scrutinise the substantive proceedings," she said.