Beam him outta here, Scotty. 

Mayor Bill de Blasio has said he’s among the "Trekkies," but on Thursday mixed up two key characters from the science fiction series. 

As he advised New Yorkers Thursday on how to avoid spreading COVID-19 during Halloween, de Blasio incorrectly identified his costume from "Star Trek," claiming to pay "homage" to Captain Kirk while dressing like Spock. 

New York City Mayor Bill de Blasio attends The 2021 Met Gala Celebrating In America: A Lexicon Of Fashion at Metropolitan Museum of Art in September in New York City. 

New York City Mayor Bill de Blasio attends The 2021 Met Gala Celebrating In America: A Lexicon Of Fashion at Metropolitan Museum of Art in September in New York City.  (Jeff Kravitz/FilmMagic)

NYC WORKERS PROTEST VACCINE MANDATE: ‘WE WILL NOT COMPLY!’ 

About 45 minutes into his daily press briefing, the wardrobe-shifting lame-duck mayor suddenly appeared in a blue long-sleeved shirt with a gold Starfleet emblem, which he said will be his getup for the upcoming holiday. 

"Now, I’m switching to another important topic:  Halloween is almost here and it’s time to choose your costume. I’ve chosen mine. This is my homage to Captain Kirk, but everyone, we want people to have a great, great Halloween," he said. 

Spock, a science officer in the program, wore a shirt nearly identical to the one de Blasio donned during the news conference. 

"Everybody, this is going to be a joyous moment for our city. The Halloween parade is back in Greenwich Village, it’s going to be an amazing time," he said. "And I want to remind everyone of the prime direction — live long and prosper, with candy. 

"OK, beam me up," he added, using a Captain Kirk catchphrase.   

"I’m supposed to change costumes immediately," the mayor quipped before changing his clothes. "It’s supposed to just — alright I’m going to have to put this back on. Let me go to our [COVID-19] indicators, and I’ll put on my regular suit." 

When a reporter later in the press briefing brought up that Captain Kirk did not wear blue, de Blasio acknowledged the mess up, noting the fictional series character wore a "burnt yellow." 

"I always say, I’m going to give credit where credit is due to the media," he said. "That’s a good catch." 

New York City Mayor Bill de Blasio speaks at "Let’s Get This Show on the Street: New 42 Celebrates Arts Education on 42nd Street" in June in Times Square.

New York City Mayor Bill de Blasio speaks at "Let’s Get This Show on the Street: New 42 Celebrates Arts Education on 42nd Street" in June in Times Square. (Photo by Bryan Bedder/Getty Images for New 42)

"I like the blue a lot, but you’re right, it’s historically inaccurate — but I’m still gonna wear it, because now we bought it," the mayor added with a chuckle. 

His "Star Trek" costume blunder comes after the mayor in April said he and his wife Chirlane McCray are "Trekkies," meaning they are staunch fans of the series. 

CLICK HERE TO GET THE FOX NEWS APP 

"Chirlane and I are Trekkies, so we have been very devoted to all the different iterations of Star Trek," de Blasio said during a virtual press briefing on April 12, when he was joined by actor Michelle Hurd, who portrays Raffi Musiker in "Star Trek: Picard," a new iteration of the series.   

Mayor Bill de Blasio attends '"It's Time For Hip Hop In NYC: Brooklyn" at Brooklyn Army Terminal in August in New York. 

Mayor Bill de Blasio attends '"It's Time For Hip Hop In NYC: Brooklyn" at Brooklyn Army Terminal in August in New York.  ( Jason Mendez/Getty Images)

On Thursday morning, de Blasio’s "tips" for keeping the coronavirus at bay during Halloween included staying outdoors, and for Big Apple residents doling out candy to trick-or-treaters to wear a mask. 

This article first appeared in the New York Post