The Countess of Wessex looked delighted as she was presented with a birthday cake during a school visit.
The surprise came from children at the Connaught Junior School in Bagshot, Surrey, on Thursday – a day ahead of Sophie’s 58th birthday.
Sophie was also given a bunch of bright yellow flowers and Happy Birthday was sung by the children during the visit in which she opened the school’s new dedicated space for science, technology, engineering, art and maths.
During the visit, which is helping to mark the school’s 60-year anniversary, she also planted a cherry blossom tree and heard about projects that the children are working on.
These include projects relating to composting with waste food and ones which highlight the dangers of plastics on the environment.
Sophie was also greeted by Toffee, the school dog, who happily did tricks for her – including doing a high five and barking on command.
A spokesman said: “Toffee has a great impact on wellbeing at Connaught, alongside Bubbles the rabbit and Poggy and Gizmo the guinea pigs.”
Sophie was also given a plate made in the pottery room by a Year 5 pupil.