"People of loving service are rare in any walk of life. Leaders of loving service are still rarer," he told the 2,000 guests, who included US President Joe Biden and Japan's Emperor Naruhito.
The coffin was then borne, to the rhythmic strains of funeral marches, on three-hour journey through the streets of London and on to Windsor Castle, west of the capital.
All along the route, a sea of arms were raised aloft, clutching mobile phones, to record the choreographed display of military precision.
The last chants of "God save the queen" were heard as onlookers scattered flowers on the road, and muffled church bells rang in the distance.
Army veteran Robert MacDonald, 48, was among the dense crowd lining the three-mile (five-kilometre) Long Walk leading up to Windsor Castle.
"I was in the infantry for 26 years, so the queen was my boss. I came to... pay my respects and salute one last time as the hearse passed by," he said.
On the Long Walk, the military cortege passed by the late queen's Fell pony, Carltonlima Emma, standing without a rider. It was met at the castle by her last two corgi dogs, Muick and Sandy.
The queen -- the longest-serving monarch in British history -- died at Balmoral, her Scottish Highland retreat, on September 8 after a year of declining health.
Her eldest son and successor, King Charles III, dressed in ceremonial military uniform, followed the solemn processions in London, alongside his three siblings.
They were accompanied by Charles's eldest son Prince William, William's estranged brother, Prince Harry, and other senior royals.
William's two eldest children, George, aged nine, and Charlotte, aged seven, who are next in line to the throne, also walked behind the coffin in Westminster Abbey.
Late Sunday, Charles, 73, and his wife, Queen Consort Camilla, 75, said they had been "deeply touched" by the public's flood of messages.
"I wanted simply to take this opportunity to say thank you," he said.
Britain, a country much changed since the queen's coronation in the same abbey in 1953, has dug deep into its centuries of tradition to honour the only monarch that most of its people have ever known.
'Moment of history'
"It's once in a lifetime," said student Naomi Thompson, 22, camped out in the crowds at London's Hyde Park.
"It's a moment of history," said engineer Alice Garret, 28.
John MacKinnon, a 49-year-old insurance broker from London, added: "The ceremony was perfect in every way.
"Very spectacular, as it should be for a great queen."
Others unable to be in London gathered in cinemas and churches around England, Scotland, Wales and Northern Ireland to watch the service and procession on big screens.
Auto engineer Jamie Page, a 41-year-old former soldier, stood on Whitehall to observe the funeral procession, wearing his military medals from service in the Iraq war.
"She means everything, she was like a gift from God," he said.
But on Charles, the oldest person yet to ascend the British throne, Page added: "Who knows, time will tell."
The funeral -- watched by the crowds in silence -- lasted just under an hour.
It ended with trumpeters playing "The Last Post", two minutes of silence in memory of the queen and the reworded national anthem, "God Save the King".
Driven to Windsor
The long procession filed past Downing Street, government buildings in Whitehall, through Horse Guards Parade and up The Mall, the tree-lined avenue that leads to Buckingham Palace decked out in red, white and blue.
At nearby Wellington Arch, 6,000 members of the armed forces who had marched in hypnotic lockstep halted and the coffin was transferred to the royal hearse.
Charles saluted and the national anthem played again before the hearse headed by road to Windsor Castle.
The queen will be buried alongside her father king George VI, her mother queen Elizabeth and sister princess Margaret, reuniting in death the family who once called themselves "us four".
The coffin of her husband, Prince Philip, who died last year aged 99, will also be transferred to lie alongside her.
Elizabeth's funeral could not be more different from Philip's at St George's Chapel, Windsor, in April 2021.
Coronavirus restrictions limited mourners to just 30, led by the queen, a solitary figure in mourning black and a matching facemask.
In contrast on Monday, the abbey was packed with dignitaries and some ordinary Britons who were honoured for their military or community service, especially during the Covid pandemic.
"You were fortunate to have had her for 70 years; we all were," Biden said on Sunday after signing a book of condolence. "The world is better for her."
In the abbey pews was Liz Truss, whom the queen appointed as the 15th British prime minister of her reign just two days before her death, in her last major ceremonial duty.
All of Truss's living predecessors were there plus her counterparts and representatives from the 14 Commonwealth countries outside Britain where Charles is also head of state.
Whether they remain constitutional monarchies or become republics is likely to be the defining feature of Charles's reign.
The queen's death has prompted deep reflection about the Britain she reigned over, the legacy of its past, its present state and what the future might hold, as well as the values of lifelong service and duty she came to represent during her 70-year reign.
Hundreds of thousands of people are estimated to have queued, sometimes for up to 25 hours and overnight, to file past the queen's coffin as it lay in state.
Chrissy Heerey, a serving member of the Royal Air Force who joined the marathon queue twice, was the last person through the doors early Monday and described the experience as "amazing".
Throughout the procession after the funeral, Big Ben, the giant bell atop the Elizabeth Tower at one end of the Houses of Parliament, tolled and military guns fired at one-minute intervals.
At Windsor, the Sebastopol Bell -- captured in Crimea in 1856 -- and the Curfew Tower Bell also sounded.
A vast television audience had been expected to watch the funeral worldwide and online, in a sign of the enduring fascination with the woman once described as "the last global monarch".
At Windsor, the queen's crown, orb and sceptre will be removed and placed on the altar at a committal service.
The most senior officer of the royal household, the lord chamberlain, breaks his "wand of office" and places it on the coffin, symbolising the end of her reign.
The lead-lined oak casket, draped with the queen's colours, will be lowered into the Royal Vault as a lone bagpiper plays a lament.
A private interment ceremony will take place at the adjoining King George VI Memorial Chapel at 1830 GMT.