A 23-year-old man was found guilty of threatening behaviour on Friday after throwing at least five eggs at King Charles in November when the monarch visited York in northern England, prosecutors said.
The Crown Prosecution Service (CPS) said Patrick Thelwell was sentenced to a 12-month community order with "100 hours of unpaid work" following his conviction after a trial at York Magistrates’ Court.
"Thelwell showed no remorse after his arrest and continued to reinforce his intent to hit HM (His Majesty) the King with the eggs," Nick Price, Head of the CPS Special Crime and Counter Terrorism Division, said in a statement.
"This threatening behaviour is unacceptable and will not be tolerated."
Last year, footage on social media showed eggs flying past the British monarch and his wife and smashing on the ground as they arrived for a traditional ceremony in York.
The CPS said while Thelwell was waiting for the arrival of the police van he was asked by a member of the public whether he threw "something," to which Thelwell replied: "I threw eggs at him because that is what he deserves."
Charles, who ascended to the throne in September after the death of his mother Queen Elizabeth, will be crowned king at the coronation ceremony at Westminster Abbey in London on May 6.
(Reporting by Farouq Suleiman, editing by Alistair Smout)