OTTAWA — Justin Trudeau’s choice in socks sparked a light-hearted Twitter competition between the stars of Star Wars and Star Trek after the Canadian Prime Minister sported Chewbacca hosiery during high-profile appearances in New York City this week.

Star Wars actor Mark Hamill applauded the appearance of his Wookie comrade on Trudeau’s socks, tweeting on Thursday it was “another reason” he loves the prime minister.

But Canadian actor William Shatner, who starred in the rival Star Trek franchise, suggested his feelings were hurt by the sock choice, tweeting a tearful emoji and message: “@JustinTrudeau I thought we were friends? Chewbacca socks?”

Trudeau is a well-known fan of Star Wars, having dressed as Han Solo — with his wife Sophie Gregoire Trudeau as Princess Leia — in 2015 to trick-or-treat on Halloween with his children.