A 22-year-old man who heckled Prince Andrew as he walked behind his mother Queen Elizabeth II's coffin in Edinburgh will not be prosecuted, the Crown Office said on Tuesday.
"After full and careful consideration of all facts and circumstances, the case was dealt with by way of an offer of an alternative to prosecution," a spokesman said.
The incident occurred as Andrew, the queen's second son, walked in the procession from the Palace of Holyroodhouse in Edinburgh to St Giles' Cathedral on September 12.
As it passed, a heckler called Andrew a "sick old man" in reference to his links to the American paedophile financier Jeffrey Epstein and claims of sex with a minor.
Andrew, who denied the claims, settled a US civil lawsuit over the allegations in February for an undisclosed sum.
The protester was then seen being bundled away by police. He was arrested shortly afterwards and charged with public order offences.
Alternatives to prosecution can include warnings, work orders, fines and compensation orders.
But the Crown Office, which brings prosecutions in Scotland, said it could not say what alternative was used in this case.
Prosecutors also said no action would be taken against a woman who held an anti-monarchy sign before the formal declaration in Edinburgh that the queen's son Charles was now king.
The woman, also aged 22, was arrested outside St Giles' Cathedral on September 11.
"After careful consideration of the facts and circumstances of the case, including the available admissible evidence, the procurator fiscal decided that there should be no proceedings taken at this time," the Crown Office said.
"The Crown reserves the right to proceed in the future if it is appropriate and in the public interest to do so."
British police faced criticism from civil liberties groups for their treatment of anti-monarchy protesters challenging Charles's automatic accession to the throne.
Other demonstrators during the official 10-day national mourning period for the queen were moved on and threatened with arrest.
The queen died aged 96 on September 8 at her Scottish Highland retreat of Balmoral after a year of declining health.