Schoolchildren visiting the Tower of London enjoyed a surprise meet-and-greet with the Prince of Wales and Duchess of Cornwall, as the royal couple toured one of the UK’s most popular attractions.

Charles and Camilla shook hands and briefly chatted to excited members of the public as they walked through the grounds.

The couple were there to mark more than 500 years since the creation of the Beefeater guards, and for a celebration of 50 years of VisitBritain.

Royal visit to the Tower of London
The Prince of Wales and Duchess of Cornwall view the coronet he wore at his investiture as Prince of Wales (Eddie Mulholland/PA)

Camilla asked some of the schoolchildren how they were enjoying their half-term break, while Charles told them they might be asked to write essays about their visit.

He joked: “See how much you can remember. When you get older you can’t remember a thing.”

One schoolteacher visiting from France said it was “perfect timing” that they chose to go to the Tower this week.

She added: “The kids are very, very happy.”

Earlier the couple met more than a dozen Yeoman Warders, commonly known as Beefeaters, and Camilla cut a lantern-shaped cake marking the 535-year history of the guards.

Royal visit to the Tower of London
The Prince of Wales and Duchess of Cornwall during their visit to the Tower of London (Eddie Mulholland/PA)

The cake, symbolising the lantern used to guide the chief warder as he locks up the tower – once a prison and place of execution – each night, was gifted by Camilla and made by Julie Brownlee, who has previously baked for the duchess.

The cake included two small sugar figures of wardens dressed in the traditional ceremonial and everyday uniforms standing alongside the gold lantern and a set of silver keys.

Before lifting a replica of Henry VIII’s hunting dagger to slice into the white chocolate and raspberry-flavoured sponge, Camilla quipped: “It’s going to be off with their heads.”

Admiring the artistry of the cake, Charles said: “It seems an awful pity to make a mess of it.”

During Thursday’s visit the couple were shown the cell where Sir Thomas More, once Henry VIII’s closest adviser, was imprisoned before his execution in 1535.

Royal visit to the Tower of London
Camilla cut a lantern-shaped cake marking the 535-year history of the guards (Eddie Mulholland/PA)

Coincidentally the visit took place 478 years to the day on which Henry VIII’s fifth wife, Catherine Howard, was executed and buried at the tower.

Charles also had a chance to view the coronet he wore at his investiture as Prince of Wales in 1969, and pointed out the “beautiful engraving” to Camilla as they both inspected the gold and platinum piece.

It will go on public display for the first time at the tower from February 19.

Bringing their visit to a close, the couple attended a reception marking five decades since the Tourism Act, which established the tourist board VisitBritain.

Charles, who is patron of English Tourism Week, and Camilla met representatives of tourist attractions from London and elsewhere in the UK.

When they left Camilla was presented with a posy of yellow and purple flowers by two-year-old Erin Allison-Amichund, daughter of the tower’s chief exhibitor.