Former Illinois Republican Rep. Joe Walsh tells Fox News he’d support a “socialist” over President Trump, making clear he'll be backing whomever is the Democratic nominee after dropping his GOP primary bid on Friday.

Walsh, in a phone interview with Fox News following his announcement, explained his decision to abandon his presidential run.

TRUMP EASILY WINS GOP IOWA CAUCUS

“It became clear to me that no one can beat Trump in a Republican primary,” Walsh told Fox News. “I think Trump is unfit for office and I think that it’s really important that a Republican is out there every day saying that.”

He added: “I want to stop Trump, and if I can’t in a primary, then I have to find other ways to do that.”

Walsh walked away from the lead-off Iowa caucuses this week with 1 percent of the vote and no delegates. The other primary challenger, former Massachusetts Gov. Bill Weld, got only slightly more.

Walsh first told CNN Friday morning that he was suspending his campaign. He went on to take shots at his own party.

FILE - In this Nov. 15, 2011, file photo former U.S. Rep. Joe Walsh, R-Ill., gestures during a news conference on Capitol Hill in Washington. (AP Photo/Carolyn Kaster, File)

“This Republican Party is not my Republican Party. It’s Trump’s political party, and I feel like I don’t belong,” Walsh told Fox News. “I think it’s a cult, and I think Trump needs to be removed.

“The next nine months are going to be devoted to using whatever platform I have to make sure Trump isn’t re-elected.”

Walsh told Fox News he was in a “unique position,” as a Tea Party conservative, to try to convince moderate conservatives to vote for a Democrat in November.

“This is not easy for me to say, I probably don’t agree with Bernie Sanders on any policy issue, but I would rather have a socialist in the White House than a dictator, a king, a man who thinks he’s above the law,” Walsh said. “I think that’s a much more dangerous threat to America than a guy in the White House fighting for free college.”

Walsh admitted he did not know whether Democrats would welcome his involvement.

The Trump campaign and the Republican National Committee declined to comment on Walsh's drop-out and comments. The party and president have largely dismissed the threat from the diminishing GOP primary field, especially with Trump firmly in control of the party following his impeachment trial acquittal.

Walsh has a checkered record of inflammatory comments that could complicate any potential role in reaching out to moderates.

Despite his fiery condemnation of Trump now, Walsh actually voted for then-candidate Trump in 2016 and famously declared he would be “grabbing his musket” if Trump lost to Democrat Hillary Clinton.

EX-GOP REP. JOE WALSH ENDS PRIMARY BID AGAINST TRUMP AFTER POOR IOWA SHOWING

Walsh first joined the 2020 race last year, after penning an op-ed in The New York Times calling Trump “a racial arsonist who encourages bigotry and xenophobia to rouse his base and advance his electoral prospects.”

Walsh, in that same op-ed, seemingly apologized for his own rhetoric during the Obama administration, which included racially charged and sometimes violent remarks about former President Barack Obama.

In 2016, Walsh tweeted about why Obama “hates Israel,” concluding falsely that it was because Obama was secretly a Muslim.

“For better or worse, I'm not afraid to say it publicly. I think Obama is Muslim. I think in his head and in his heart he has always been. And I think it explains Obama's hatred toward Israel and explains his weakening of America these past 8 years,” he tweeted.

“It's not complicated,” he added.

Walsh has since tried to reconcile these statements with his current stance.

In his op-ed for the Times last year, he said he only voted for Trump in 2016 because “he wasn’t Hillary Clinton” and said that he initially gave him the benefit of the doubt before turning on him.

His departure from the GOP primary race is an abrupt reversal for a candidate who told Fox News last fall he would campaign in every state and was "in this to win."

Fox News' Adam Shaw contributed to this report.