The contents of Prince Philip’s will are to remain a secret.

Last year, a judge ruled that the will of Queen Elizabeth’s late husband would be sealed and kept private for at least 90 years. The Guardian, a U.K.-based outlet, challenged the decision to exclude media from a July 2021 hearing that made that ruling.

But on Friday, judges rejected the claim, saying there were "exceptional" circumstances for the hearing to be held in private, The Telegraph reported.

According to the outlet, judges Sir Geoffrey Vos, Dame Victoria Sharp and Lady Justice King said the press could not be alerted to the private hearing "without risking the media storm that was feared."

HER MAJESTY QUEEN ELIZABETH II AND HER RECORD-BREAKING RULE AS THE LONGEST REIGNING BRITISH MONARCH

Prince Philip

Prince Philip, the irascible and tough-minded husband of Queen Elizabeth II who spent more than seven decades supporting his wife in a role that both defined and constricted his life, died in 2021. (AP)

"The hearing was at a hugely sensitive time for the sovereign and her family, and those interests would not have been protected if there had been protracted hearings reported in the press rather than a single occasion on which full reasons for what had been decided were published," the judges said in the ruling.

Wills in the U.K. are usually public record after someone’s death. However, it has been common practice for over a century to keep the wills of royal family members sealed.

"It is true that the law applies equally to the royal family, but that does not mean that the law produces the same outcomes in all situations," the judges said. "These circumstances are, as we have said, exceptional.

"We are not sure that there is a specific public interest in knowing how the assets of the royal family are distributed. A perceived lack of transparency might be a matter of legitimate public debate, but the (Non-Contentious Probate Rules) allow wills and their values to be concealed from the public gaze in some cases. 

"The judge properly applied the statutory test in this case."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Prince Philip Queen Elizabeth

Queen Elizabeth II and the Duke of Edinburgh wave at the crowds from the balcony at Buckingham Palace after Elizabeth's coronation on June 2, 1953.  (Keystone/Hulton Archive/Getty Images)

Philip, who spent more than seven decades supporting his wife as Britain’s longest-serving consort, passed away in 2021 at age 99. In his lifetime, the Duke of Edinburgh fulfilled more than 20,000 royal engagements to boost British interests at home and abroad. He headed hundreds of charities, founded programs that helped British schoolchildren participate in challenging outdoor adventures and played a prominent part in raising his four children, including his eldest son, Prince Charles, the heir to the throne.

CAMILLA, DUCHESS OF CORNWALL, REFLECTS ON FUTURE QUEEN CONSORT ROLE: ‘YOU’RE THERE AS A BACKUP’

Prince Philip will

Prince Philip is survived by his wife, Queen Elizabeth II, and their four children. (Tim Graham/Getty Images)

Philip is survived by the queen, 96, and their four children — Charles, 73, as well as Princess Anne, Prince Andrew and Prince Edward.

The Associated Press contributed to this report.