A 25-year-old man was on Monday fined £1,000 ($1,237) but spared prison for trespassing near King Charles III's official London residence.
Awad Mustafa, of no fixed address, was detained in the early morning of September 16 following reports of a person climbing a wall near Buckingham Palace.
He will also have to pay a victim surcharge of £400 and costs of £85, court staff at London's Westminster Magistrates' Court said.
The Metropolitan Police said at the time that he was detained outside the stables in the Royal Mews but he did not enter the palace or its grounds.
The Royal Mews at Buckingham Palace handles the road travel arrangements for the British monarch and other members of the royal family, by both car and horse-drawn carriage.
It is a working stables housing the Windsor Greys and Cleveland Bays that pull the royal carriages, and looks after state carriages and coaches.