King Charles III and his wife Queen Consort Camilla narrowly avoided being hit with eggs thrown at them during a visit to northern England on Wednesday, British media footage showed.
The 73-year-old monarch and Camilla, 75, appeared to be targeted with three eggs which landed near them during a walkabout in York, before they were ushered away by minders.
A man was heard shouting "this country was built on the blood of slaves" and "not my king" before he was detained by several police officers as the incident occurred, the footage showed.
The protester also booed the royal couple before he appeared to lob the eggs at them, according to reporters at the scene.
Other people in the crowds that had gathered at the historic Micklegate Bar location for the visit started chanting "God save the King" and "shame on you" at the protester.
Charles and Camilla continued with a traditional ceremony to officially welcome the sovereign to the city of York by the lord mayor as police were pictured taking the suspected perpetrator into custody.
UK media named him as a former Green Party candidate and activist with the Extinction Rebellion environmental protest group.
The royals were in the historic city to attend the unveiling of a statue of Charles's mother Queen Elizabeth II, the first to be installed since her death on September 8.
On Tuesday, Charles met artists in nearby Leeds who had taken part in a project exploring Britain's role in slavery -- and revealed he was open to discussions on the topic.
"He is ready to have these conversations and see what work can be done," Fiona Compton, a St Lucian artist and historian who knows the monarch and was involved in the project, told reporters afterwards.
"He agrees, this is British history, it should not be hidden.
"In the same way we are speaking about the Holocaust, we should be open to speaking about Britain's involvement in the slave trade," added Compton, whose father was prime minister of St Lucia.
The issue has increasingly confronted the royal family, as growing republican movements in Commonwealth countries with the British monarch as head of state call on the Crown to apologise for the slave trade and atone for colonisation.
During a tour of the Caribbean by the king's eldest son Prince William earlier this year, he faced protests about past royal links to slavery, demands for reparations and growing republican sentiment.
Charles's youngest brother, Prince Edward, experienced similar protests and cancelled a leg to Grenada after pro-republican protests there.
Domestically, Charles is less popular than his late mother, who maintained highly favourable ratings throughout her record-breaking seven-decade reign.
The latest polling by YouGov found 44 percent of adults had a positive opinion of him, compared to nearly three-quarters for Queen Elizabeth II.
Despite promoting environmental causes for decades, climate activists last month smeared chocolate cake over a waxwork model Charles at London's Madame Tussauds museum.
During the national period of mourning for the queen in September, republican movements said anti-monarchist views were drowned out.
There was criticism of police handling of protesters who publicly questioned the hereditary principle of Charles's accession.