Prince William, Kate Middleton and Prince Harry never looked happier than they did racing each other for charity

LONDON, ENGLAND - FEBRUARY 05: Catherine, Duchess of Cambridge, Prince William, Duke of Cambridge and Prince Harry race during a Marathon Training Day with Team Heads Together at the Queen Elizabeth Olympic Park on February 5, 2017 in London, England. (Photo by Alastair Grant - WPA Pool/Getty Images)

Prince William and Kate Milddleton, the Duke and Duchess of Cambridge, along with Prince Harry, had a little Royal Family competition at an event for their mental health charity Heads Together.

Videos by Rare

The royals joined nearly 150 volunteers who were preparing to run the 2017 London Marathon at the starting line of London Marathon Community Track. During their visit, Prince William, Prince Harry and Duchess Kate each ran one leg of the relay, which was about 50 meters.

RELATED: Here’s how Prince William and Kate honored Princess Diana once again 

William had a little fun with his teammates ahead of the race by joking, “Oh, my hamstring,” before taking off against his wife and brother.

According to People Magazine, Prince Harry was the first to finish with William in second place and Duchess Kate bringing it in for third place.

“You nearly beat me!” William reportedly exclaimed to his wife after the race.

Apparently, it was a close one!

What do you think?

New Jersey just took an unprecedented step to help homeless animals

Tom Brady gave his ill mother a sweet smooch before hitting the field for Super Bowl LI