Harry, who saw action on the front line during two tours of duty in Afghanistan, has previously been denied the chance to wear his military uniform as he publicly mourns, because he is no longer a working royal.
But the King decided his youngest son could wear uniform for the vigil, saying he would stand at the foot of the coffin, with William at the head.
William and Harry were joined in their silent tribute around the coffin by cousins Zara Tindall and Peter Phillips, Princesses Beatrice and Eugenie, and Lady Louise Windsor and her brother Viscount Severn.
Beatrice and Eugenie on Saturday paid a personal tribute to the Queen, saying: “Goodbye dear Grannie, it has been the honour of our lives to have been your granddaughters and we’re so very proud of you.”
On Friday evening, the Queen’s children – Charles, the Duke of York, the Princess Royal and the Earl of Wessex – took part in their own vigil.
The King, Anne, Andrew and Edward had solemn looks on their faces as they stood vigil around their mother’s coffin, with their heads bowed throughout as members of the public filed slowly past them.
It comes as final preparations are under way for the funeral on Monday, with politicians and royal dignitaries from around the world arriving throughout the weekend.
On Saturday, Prime Minster Liz Truss met the prime ministers of Australia and New Zealand – Anthony Albanese and Jacinda Ardern – at the Government’s Chevening country residence, a No 10 spokesperson said.
As well as her head-to-heads with world leaders on Sunday, Ms Truss will have an audience with the King before attending his reception for visiting heads of state at Buckingham Palace.
Charles has also met chiefs of staff at Buckingham Palace on Saturday and visited police headquarters to thank the emergency services for their work in planning the funeral.
Charles concluded his tour of the home nations on Friday, starting his day with a visit to Wales, after trips to Northern Ireland and Scotland in recent days.
Meanwhile, thousands of people continue to queue to see the Queen’s coffin laying in state, with some facing more than a day in line.
HER MAJESTY THE QUEEN'S LYING-IN-STATE QUEUE UPDATE, 1:15AM, 17 SEP
The queue is near total capacity with a wait time of at least 25 hours
Please do not travel to join the queue
Check back for updates in the morning pic.twitter.com/3bLTgIfgHu
— Department for Digital, Culture, Media and Sport (@DCMS) September 17, 2022
As of 5am on Saturday, the Department for Digital, Culture, Media & Sport’s lying in state queue tracker said lines were expected to last for “at least 24 hours”, after stretching out to 25 hours earlier in the morning.
Those inside Westminster Hall were briefly shocked on Friday night when a man was arrested after moving out of the queue to approach the Queen’s coffin.
Metropolitan Police said the incident occurred around 10pm, as the live feed from inside the hall cut away for a brief period.
A statement from Scotland Yard said: “Around 22:00hrs on Friday 16 September officers from the Met’s Parliamentary and Diplomatic Protection Command detained a man in Westminster Hall following a disturbance.
“He was arrested for an offence under the Public Order Act and is currently in custody.”
Two thousand people will gather inside Westminster Abbey in London on Monday for the Queen’s funeral.
Some 800 people, including members of the Queen’s Household and Windsor estate staff, will attend the committal service afterwards at 4pm in St George’s Chapel, Windsor Castle.
After the funeral, the King and members of the royal family will walk behind the Queen’s coffin to Wellington Arch when it leaves Westminster Abbey, before it is driven to Windsor on the state hearse.