Prince Harry and Meghan joined the Queen and other senior royals at the Commonwealth Day service at Westminster Abbey on Monday afternoon.
The couple have been carrying out a series of public appearances in the UK before stepping back as working royals.
From 31 March, they will stop using their HRH titles and receiving public money.
The duke and duchess joined the Queen – who is head of the Commonwealth – the Prince of Wales, the Duchess of Cornwall and the Duke and Duchess of Cambridge in the central London church.
Last-minute changes meant the Cambridges and the Sussexes were led straight to their seats – rather than waiting for the Queen and taking part in the procession as they did in 2019.
Kensington Palace and Buckingham Palace have not said why the late amendment was made.
It was the first time Sussexes have appeared with other members of the Royal Family since announcing their intention to “step back” as senior royals in January.
The service included Rwandan dancing and drumming as well as songs from Craig David and Alexandra Burke, hymns, and a reading from Prime Minister Boris Johnson.
Prince Harry bumped forearms with singer Craig David when they met at the end of the service – while Meghan opted to hug him.
Members of the congregation had been advised not to shake hands in greeting, to help reduce the spread of the coronavirus, a spokeswoman for Westminster Abbey said.
Harry’s brother, the Duke of Cambridge, said that it felt “very odd not shaking hands” as he arrived at the event.
But when Prince William chatted to heavyweight boxing champion Anthony Joshua, who gave a reflection during the service, the royal avoided shaking his hand and said: “I feel you’d crush mine.”
As the Sussexes left the abbey, the duchess crouched down to chat to children who were handing out flowers.
The duke waved to some of those gathered inside the abbey gates, and the couple held hands as they walked towards their car.
After the service, the Sussexes are expected to return to their current base in Canada, where their son, Archie, has remained during the UK trip.
It is where the couple are to begin their new life of personal independence, pursuing private commercial deals and charity projects.
This wasn’t going to be a quiet goodbye or an easing out of the limelight.
The final days of public events for the Duke and Duchess of Sussex have been picture perfect.
Their final engagement at Westminster Abbey showcased everything Harry and Meghan are now leaving behind – ceremony, pomp, formality and just a bit of royal hierarchy.
The Sussexes sat behind the Queen, Prince Charles and the Duke and Duchess of Cambridge. Was there a tension or any sign of family frostiness? It was impossible to tell.
But this can’t have been an easy afternoon for those involved.
The Queen has made it clear the departure of the Sussexes was not the outcome she wanted.
Prince Charles will now see far less of his son, his daughter-in-law and his newest grandchild.
Harry and Meghan, who many felt brought a new energy to the Royal Family, are now off.
Less than two years after she arrived, Meghan is walking away from royal life. And the man she married, who was born into that life, is going with her.