Queen Elizabeth II has ordered that no royal should wear military uniform for the Duke of Edinburgh’s funeral.

Prince Harry had faced the humiliating prospect of being the only senior male in the royal family who won’t wear the military uniform after losing his honorary ranks.

Harry, 36, was stripped of his three military titles when he quit royal duty with wife Meghan.

Royal protocol now means the Duke — who did two tours of Afghanistan with the Blues and Royals — can only wear a suit with medals at royal functions.

Also, there was serious debate about whether Prince Andrew should be allowed to wear his Admiral uniform since he’s been implicated in the scandal involving convicted pedophile Jeffrey Eastern.

While Andrew has lost many of his charitable patronages, he has not been stripped of his military positions and titles yet, unlike Prince Harry.

Piers Morgan even weighed in saying “shameful” Prince Andrew should be denied wearing an Admiral’s uniform until he speaks to the FBI over his alleged links to Jeffrey Epstein.

Piers Morgan wrote: “His request to attend the funeral as an Admiral when he has so far failed to either clear his name or return to public duties is completely outrageous.

“How dare he ‘demand’ anything given his refusal to be interviewed by the FBI about a very serious sex crime investigation?”

Insiders involved in planning for Saturday’s funeral claim the Queen personally stepped in to suggest all senior male royals wear suits and ties.

A military source told The Sun: “It’s the most eloquent solution to the problem.”

Another source confirmed last night that “current thinking is no uniforms”.