A British university student is being banned from carrying eggs in a public place after allegedly throwing them at King Charles III and the Queen Consort.

The royal couple were being welcomed by city leaders in York when several eggs were thrown at them as the protester booed the pair.

Police controlling crowd

Charles continued shaking hands with dignitaries including the Lord Mayor as the eggs flew in his direction, pausing briefly to look at the cracked shells on the ground.

The eggs missed the King and Queen Consort and they were ushered away.

Several officers were seen restraining a man on the ground behind temporary fencing set up for the King’s visit.

Britain's Prince Charles to visit Barbados to mark republic's birth |  Reuters