The Queen was praised for “staying the course” as royals joined dignitaries at a thanksgiving service for the Platinum Jubilee at St Paul’s Cathedral.
Referring to her love of horse racing, Archbishop of York Stephen Cottrell said she is “still in the saddle”, even though she was not able to attend.
The Sussexes joined the Prince of Wales and the Cambridges for their first royal event since leaving the UK.
The Queen, 96, watched the service from Windsor Castle.
Her decision to miss the service came after she experienced “discomfort” during Thursday’s events, Buckingham Palace said.
Meanwhile, Prince Andrew was forced to withdraw from attendance after a positive Covid test.
As Prince Harry and Meghan arrived in St Paul’s Churchyard, they received a huge cheer from the crowd, after keeping a low profile on Thursday.
NHS workers, honours recipients, public servants and charity representatives were among those at the service – part of four days of events marking the Queen’s unprecedented 70-year reign.
Notable guests included Prime Minister Boris Johnson, who arrived to boos and cheers, and his wife, Carrie.
Labour leader Sir Keir Starmer, and former prime ministers John Major, Tony Blair, Gordon Brown, David Cameron and Theresa May were there. The leaders of the UK’s devolved administrations were also in attendance.
Mr Johnson gave a reading from St Paul’s Epistle to the Philippians in the New Testament, beginning: “Rejoice in the Lord always”.
The sermon was given by the Archbishop of York after Justin Welby, the Archbishop of Canterbury, tested positive for coronavirus last week.
Referencing the Queen’s love of horse racing and Saturday’s Epsom Derby – which will mark the jubilee – Mr Cottrell praised the monarch’s endurance over her reign.
He said: “Your Majesty, we’re sorry you’re not with us this morning in person, but you are still in the saddle. And we are all glad that there is still more to come.
“So, thank you for staying the course. Thank you for continuing to be faithful to the pledges you made 70 years ago. Thank you for showing us how service and faithfulness matter. People of all faiths and none can learn from this.”
Humour and poignancy at service
With the Queen having to miss her own thanksgiving service, it was always going to be slightly subdued.
But it was still a cheerful gathering, with the Archbishop of York addressing his sermon to the Queen watching on television at home.
In a nod to her love of horse racing, he praised her for “staying the course” for such a long reign of duty and public service.
The sermon cantered through a number of her key interests: God; horses; and a good sense of humour.
Boris Johnson faced a mixed response from the crowd outside. But the Royal Family presented a unifying image.
Prince Harry and Meghan had seamlessly returned to a major royal event for the first time in two years.
In a sign of things to come, Prince Charles and Camilla, Prince William and Catherine, took over the main ceremonial roles, with that quartet of senior royals increasingly taking on the responsibilities of the monarch.
There were choirs, bells ringing, famous faces in the congregation, and prayers. But there was also a poignancy to the absence of the Queen, the central focus of the event.
The archbishop added the Platinum Jubilee was a time of “great rejoicing” which took place against a backdrop of “such suffering and uncertainty in our world”.
But he said the Queen was an example of leaders who serve the common good with “a staunch constancy and a steadfast consistency; a faithfulness to God, an obedience to a vocation that is the bedrock of her life”.
After the service, the largest church bell in the UK – the 16-tonne Great Paul – began ringing continuously for four hours.
Several royals and other guests went on to attend a reception at London’s Guildhall.
As well as marking her service to church and country, Friday’s event at St Paul’s was also intended to pay tribute to the Queen’s efforts to foster unity among all communities.
Chief Rabbi Ephraim Mirvis, who attended and who wrote a prayer for the Queen, told the BBC her interest in the faiths of others went beyond duty.
“She has genuine care, genuine interest and wants the best – certainly for our faith and for all faiths,” he said.
The service was one of the key events in four days of celebrations to mark the first time a British monarch has reigned for 70 years.
On Thursday, thousands of people gathered in central London for the traditional Trooping the Colour ceremony and a spectacular fly past of Buckingham Palace.
The Queen later illuminated a globe at Windsor Castle that coincided with the lighting of thousands of beacons across the UK and the Commonwealth.
The celebrations will continue with the Platinum Party at the Palace on Saturday, a concert at Buckingham Palace featuring performances by Queen, Sir Rod Stewart and Diana Ross.
And on Sunday, 10 million people are expected to hold street parties and other celebrations.
Prince Andrew’s infection was picked up during routine testing, Buckingham Palace said, meaning he would miss the St Paul’s service “with regret”.
The Queen has previously spoken of mobility problems and the palace confirmed ahead of the Jubilee the monarch would consider the events she felt able to attend during the four-day celebration.