Former GOP lawmaker Joe Walsh ― once a favorite of the tea party movement ― says he hardly agrees with Sen. Bernie Sanders (I-Vt.) on anything.

But if Sanders is the Democratic nominee, Walsh says, he’ll not only vote for him but will campaign for him, too, to help beat President Donald Trump.

“I’d rather have a socialist in the White House than a con man,” he wrote in an op-ed in The Washington Post.

Walsh was initially a Trump supporter, but last year he apologized for “helping to put an unfit con man in the White House” as well as for his own extremist rhetoric over the years.

He launched a long-shot primary challenge against Trump but dropped out earlier this month after receiving just 1% in the Iowa caucus.

He wrote that he’s now committed to voting for whoever wins the nomination on the Democratic side because “never Trump” truly means “never Trump.”

And he called out fellow members of the GOP’s “Never Trump” movement for wavering based on who becomes the Democratic nominee.

He wrote:

“I hate to break it to you, but if you’re really never-Trump, then you know there’s no except-if-he’s-a-socialist footnote. There’s no but-she’s-way-too-professor-ish clause. Nothing in the fine print says the only acceptable Democratic alternative is another arrogant billionaire. I thought this was understood.”

Walsh, author of “F*ck Silence: Calling Trump Out for the Cultish, Moronic, Authoritarian Con Man He Is,” says Trump is a bigger threat to America than any of Sanders’s policy proposals.

“If he’s the nominee, I won’t just vote for him,” he wrote. “I’ll campaign for him.”