The Duke and Duchess of Cambridge duelled with wands like wizards from the Harry Potter movies after they were given a crash course in the magical arts.
William and Kate stepped into the world of the teenage wizard and excelled at the task set them - wand combat.
The royal couple were put through their paces during a visit to officially open the £100 million Warner Bros studios in Leavesden near Watford, and were joined by Prince Harry for the trip.
The sprawling site was the production home of all eight Harry Potter films, the James Bond movie Goldeneye starring Pierce Brosnan, the first of the Star Wars prequel films, and director Tim Burton's gothic horror Sleepy Hollow.
It is also where a major attraction is based telling the story of the boy wizard and giving fans a behind the scenes glimpse into the making of the movies through props, costumes, scenery and special effects.
Author JK Rowling was at the studios for the visit and was praised by the Duke in a speech he made before officially opening the site.
When their lesson began William was handed a replica of Harry Potter's wand while Kate, who is six months pregnant and wore a £38 polka dot dress from Topshop, wielded Hermione Granger's weapon. The royal trio are all fans of the teenage wizard but only the Duchess is thought to have read the books and seen the films.
Scott Heron, 20, from the studio tour, took the lesson and showed the couple three moves - a lunge forward and back with the wand, a swishing move from side to side and finally an underarm flick. With arms raised like they were about to go into battle William and Kate performed the move in front of some of the 500 children and their parents from charities associated with the royals who had been invited to the Potter tour.
The Duke and Duchess then faced each other and battled it out, with the second-in-line to the throne claiming he had won as he playfully hit his wife with his wand. William and Kate caught up with Harry in a replica of Diagon Alley, full of the curious shops where the teenage wizard gets his supplies for Hogwarts. The Duke and Duchess were offered another lesson in the art of wielding a wand and when Harry was asked to join he was a little wary saying: "I'm not qualified."
They were given the task of trying to hit a sign for a pot shop with wizardry and both the Duke and Duchess made it clang with a flick of their wrists but nothing happened with the Prince waved his wand. Miss Coates joked: "It's the wizard, never the wand."