LONDON -- A judge ruled Thursday that the will of the late Prince Philip should remain secret to protect the 鈥渄ignity鈥 of his widow Queen Elizabeth II.

Philip died in April at the age of 99 after more than seven decades of marriage to the queen.

Wills are usually public documents in Britain, but for almost a century it has been customary for the wills of senior royals to be sealed on the order of the High Court.

Judge Andrew McFarlane said Philip's will should be sealed for 90 years. After that, it can be be opened in private and consideration given to whether it should be published.

鈥淚 have held that, because of the constitutional position of the Sovereign, it is appropriate to have a special practice in relation to royal wills,鈥 McFarlane said in a written judgment. 鈥淭here is a need to enhance the protection afforded to truly private aspects of the lives of this limited group of individuals in order to maintain the dignity of the Sovereign and close members of her family.鈥

The judge stressed that he had not seen or been told of the contents of the will.

McFarlane said that as president of the High Court's family division, he is custodian of a safe which holds 30 envelopes, each containing the sealed will of a deceased royal, including the late Queen Mother Elizabeth and the current queen's sister, Princess Margaret. Both died in 2002.

In the years that followed, a man who claimed to be Margaret's illegitimate son, Robert Brown, fought a failed court battle to have both wills unsealed in order to seek evidence for his claim.

The judge said that while there might be 鈥減ublic curiosity鈥 about royal wills, 鈥渢here is no true public interest in the public knowing this wholly private information.鈥

The ruling came after a court hearing in July that was held in private. Media organizations were not allowed to make the case for publishing the will.