The Duke of Edinburgh’s will is to remain sealed for 90 years “to protect the dignity of the Queen”.

In a ruling published last week, Sir Andrew McFarlane, president of the Family Division of the High Court, stated: “There 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.”

It has been convention for over a century that, when a senior member of the royal family dies, an application to seal their will is made. The documents are therefore not open to public inspection in the way a will normally would be.

Sir Andrew is currently the custodian of a safe containing 30 sealed wills of a deceased Royal. The earliest of these belongs to Prince Francis of Teck; who died in 1910, aged 40, shortly before his sister Mary was crowned Queen.

Sir Andrew said he initially thought the application to seal the Duke of Edinburgh’s will will should be heard in public. However, he was persuaded that a private hearing was more appropriate following submissions from counsel for the executor of the will and the attorney general.

The hearing into the application took place in July.

Suggesting the application “might generate wholly unfounded conjecture” Jonathan Crow QC, for the executor, said the resulting publicity would be intrusive to the Queen.

Attorney general Michael Ellis QC added that media interest in matters concerning the Royal family was “insatiable”.

After 90 years, each royal will is due to be opened and examined by the monarch’s private solicitor, the keeper of the Royal Archives, the attorney general and by any personal representatives of the deceased who may still be available.

The group’s task would include deciding whether the will should then be made public. However, Sir Andrew pointed out that some royal wills may never be published, even in part.