“Star Trek” actor William Shatner got into a heated Twitter exchange with millennial users who incorrectly targeted him with the popular “OK Boomer” jab.

For those unfamiliar, “OK Boomer” is a popular phrase used to dismiss the opinions of baby boomers that younger people deem irrelevant or uninformed. Shatner was commenting on a back-and-forth between “Dancing with the Stars” host Tom Bergeron and viewers upset about Sean Spicer’s continued presence on the show when one of his followers directed the “OK Boomer” jab at the 88-year-old actor.

Shatner was born in 1931 and is, by definition, not a boomer.

WILLIAM SHATNER SHARES TOUCHING LEONARD NIMOY MEMORY, EXPLAINS WHY HE'S TAKING ON 'THE UNXPLAINED'

“Sweetheart, that’s a compliment for me,” he wrote.

“I’m not really into pejoratives, but what’s the term for people when they can’t interpret a joke?” the user replied.

“Millennial?” Shater fired back.

He continued: “I feel it’s like one of those childish insults in fandom that seem to affect the delicate types to the point they meltdown & go over the rest of our heads as something ridiculous,” he wrote. “If the person posting it thinks they are making a dig; they are the fools.”

While the original poster stopped responding, another user chimed in noting that “OK Boomer” is “not for the boomers that understand sh--. It’s for the ignorant ones like you.”

The “Star Trek” actor didn’t let the insult stand.

WILLIAM SHATNER TALKS NEW CHRISTMAS ALBUM, GUEST STARS AND GETTING HELP FROM A MILITARY VETERAN

“And just what are we ignorant about Courtney? We don’t understand struggles? War? Depressions (economic not personal)? Inflation? Double digit Prime Interest rates?” he retorted.

That’s when the user made the argument that millennials inherited hardships from the boomer generation — another slight that Shatner couldn’t abide.

“And the meek shall inherit... is that all your generation does is point fingers and blame others for their pity parties? You don’t get a participation trophy for life; you take what you get and play your best hand. It’s been that way since forever,” he tweeted.

The duo then argued back-and-forth for several hours about whether or not they are a boomer or a millennial respectively.

“I said I’d wear that badge with honor. Unlike you; the generations designation doesn’t define me nor am I too worried about getting labeled because it makes no difference to me. You seemed to be obsessed; blaming other gens. Some millennials are pushing 40. You aren’t kids,” Shatner wrote.

CLICK HERE TO GET THE FOX NEWS APP

He concluded: “Her bio says she’s an actress. No production wants someone who blames their situation on everyone else. That’s Divaesque. She entitled to her opinion but she isn’t doing herself any favors by pretending she’s siding with millennials while pretending she’s not one.”