Among those who came from around Britain and beyond, people climbed lampposts and stood on barriers and ladders to catch a glimpse of the royal procession.
Some wore smart black suits and dresses. Others were dressed in hoodies, leggings and tracksuits. A woman with dyed green hair stood next to a man in morning suit as they waited for the London procession to begin.
Millions more watched on television at home on a public holiday declared for the occasion, the first time the funeral of a British monarch has been televised.
“I’ve been coming to Windsor for 50 years now,” said Baldev Bhakar, 72, a jeweller from the nearby town of Slough, speaking outside Windsor Castle.
“I saw her many times over the years; it felt like she was our neighbour and she was just a lovely woman; a beautiful queen. It was good to say one last goodbye to our neighbour.”
Elizabeth died on Sep 8 at Balmoral Castle, her summer home in the Scottish highlands.
Her health had been in decline, and for months the monarch who had carried out hundreds of official engagements well into her 90s had withdrawn from public life.
However, in line with her sense of duty she was photographed just two days before she died, looking frail but smiling and holding a walking stick as she appointed Liz Truss as her 15th and final prime minister.
Such was her longevity and her inextricable link with Britain that even her own family found her passing a shock.
“We all thought she was invincible,” Prince William told well-wishers.
The 40th sovereign in a line that traces its lineage back to 1066, Elizabeth came to the throne in 1952 and became Britain’s first post-imperial monarch.
She oversaw her nation trying to carve out a new place in the world, and she was instrumental in the emergence of the Commonwealth of Nations, now a grouping comprising 56 countries.
When she succeeded her father George VI, Winston Churchill was her first prime minister and Josef Stalin led the Soviet Union. She met major figures from politics to entertainment and sport including Nelson Mandela, Pope John Paul II, the Beatles, Marilyn Monroe, Pele and Roger Federer.
Despite being reputedly 1.6m tall, she dominated rooms with her presence and became a towering global figure, praised in death from Paris and Washington to Moscow and Beijing. National mourning was observed in Brazil, Jordan and Cuba, countries with which she had little direct link.
“People of loving service are rare in any walk of life,” Welby said during the funeral. “Leaders of loving service are still rarer. But in all cases, those who serve will be loved and remembered when those who cling to power and privileges are long forgotten.”