"Real Time" host Bill Maher took a swipe at billionaire Elon Musk for suggesting his political allegiance might shift in the upcoming elections. 

This week, Musk went viral for a tweet he made Wednesday denouncing Democrats and hinting he'd cast his vote for Republicans for the first time. 

BILL MAHER PANEL MOCKS BIDEN'S ‘ULTRA-MAGA’ ATTACK: ‘SOUNDS LIKE A CONDOM’

"In the past I voted Democrat, because they were (mostly) the kindness party," Musk wrote. "But they have become the party of division & hate, so I can no longer support them and will vote Republican."

He added, "Now, watch their dirty tricks campaign against me unfold" with a popcorn emoji. 

Elon Musk

Elon Musk attends The 2022 Met Gala Celebrating "In America: An Anthology of Fashion" at The Metropolitan Museum of Art on May 02, 2022 in New York City. (Photo by Dimitrios Kambouris/Getty Images for The Met Museum/Vogue) (Dimitrios Kambouris/Getty Images for The Met Museum/Vogue)

During a panel discussion Friday night, Maher reiterated his stance on how he could never cast a vote for a Republican since the party "doesn't believe in the emergency of climate change or democracy."

"Elon Musk this week — I'm a big fan in many ways, but when he says, ‘Now I’m going to vote Republican,' I've got to part company there. C'mon, Elon," Maher exclaimed. "I can't go there with him because of what I just said, because of where the big issues are, but it's troubling to me that a guy like that who said, 'I voted mostly Democrat for the longest time and now I'm switching.' I mean, I'm not going to say is a stupid man... So the fact that he can be taken over by the Republicans, what does that tell you about the Democrats? What do they have to do to stop that from happening?"

BILL MAHER CONDEMNS PROTESTS OUTSIDE SUPREME COURT JUSTICES' HOMES, CALLS OUT WHITE HOUSE: ‘IT’S WRONG!'

Comedian Adam Carolla responded by pointing to Democratic regulations on businesses and how Musk moved his Tesla headquarters from California to Texas as part of his rationale. 

While Maher heralded Musk as a "genius," he insisted the billionaire is "lacking some perspective here on what party is the most dangerous now."

"Real Time" host Bill Maher

HBO’s "Real Time" host Bill Maher recently addressed the "war on jokes." (HBO)

Former Democratic National Committee chair Donna Brazile attempted to downplay Musk's political shift, insisting there isn't a "movement" away from the Democratic Party. 

CLICK HERE TO GET THE FOX NEWS APP

"Well, there may not be a movement because there is a bit of an exodus," Maher pushed back. "I mean, people leave this state and move to Texas. That happens. Look at the polls for what's gonna happen in November. People are voting more Republican in November. The Democrats are going to get their a---- kicked."

The HBO star previously praised Musk for his ongoing takeover of Twitter, hoping the billionaire will restore free speech principles on the platform.