Mark Hamill
Mark Hamill didn't make eye contact with Princess Margaret during their first meeting. Pictured: Hamill arrives as the annual Saint Patrick's day parade takes place on March 17, 2018 in Dublin, Ireland. Getty Images/Charles McQuillan

Mark Hamill was reportedly pranked by his “Star Wars” co-star ahead of his first meeting with the royal family.

In 1980, when Hamill was just 29 years old, he and his co-stars met the royal family while promoting the “Star Wars” sequel, “The Empire Strikes Back.” Billy Dee Williams, who played the role of Lando Calrissian in the film, told Hamill that he cannot make eye contact with the members of the British clan.

More specifically, Williams told Hamill that if he is caught looking into the eyes of a royal, he will be imprisoned in the Tower of London. Hamill, who plays the role of Luke Skywalker, believed his co-star so he stared at the floor while talking to Princess Margaret.

A photo of Hamill shaking the hands of Queen Elizabeth II’s younger sister while his head is bowed down vent viral following their meeting. This week, the actor shared the photo on his Twitter account.

“This photo was snapped moments after @realbdw told me that direct eye contact with royalty was an offense punishable by imprisonment in the Tower of London. #Pranked,” he captioned his photo.

Years later, Hamill once again met a member of the royal family while promoting “Star Wars: Special Edition.” He and Prince Charles were photographed laughing and talking at the premiere.

In 2016, it was also reported that Hamill spent time with Prince William and Prince Harry on the set of “Star Wars: The Last Jedi.” The royal siblings revealed that they are huge fans of the franchise.

After meeting Prince Charles’ sons, Hamill said, “If I went towards royalty with my arms outstretched, I would get arrested – but there’s something about a Wookie that means you just want to be hugged.”

Prince William and Prince Harry also made a cameo in “Star Wars: The Force Awakens,” where they played the role of Stormtroopers. However, their scene was cut out of the final edit because they appeared to be so much taller than the other Stormtroopers.