It was not long ago that Judge Andrew Napolitano was among the cable news stars least likely to be viewed as an anti-Trump truth teller.

The Fox News judicial analyst caused a minor diplomatic incident weeks after President Trump took office by claiming on air that British intelligence officials wiretapped Trump at the behest of the Obama administration.

The assertion was parroted by the White House and the president himself, garnering media attention and infuriating British officials (who vehemently denied Napolitano’s claim). Critics blasted Fox News for carrying Trump’s water by uncritically perpetuating unverified claims. Fox ultimately suspended Napolitano, and the network’s consummate newsman Shepard Smith rebuked the unsubstantiated claim on air.

But since then, Judge Napolitano has frequently been in the news for a very different reason: He has emerged as one of the most prominent Fox News skeptics as to the Trump team’s legal arguments—and a frequent foil for many of Fox’s Trump-boosting hosts.

Clips of his rebuttals to Fox News hosts have become fodder for many online news outlets (including this one), and have caught the attention of rival networks.

Earlier this month, CNN analyst Jeff Toobin praised Napolitano for “simply telling the truth,” while New Day host Alisyn Camerota said Napolitano’s willingness to go “off the reservation” on the Russia investigation was “striking.” MSNBC’s Morning Joe ran a segment on Napolitano’s suggestion that Trump could be indicted, prompting host Mika Brzezinski to quip: “You know it’s bad when you’ve lost Fox News.”

Additionally, the libertarian Napolitano’s on-air departures from the Fox News line have earned him the unlikely public praise of left-wing politicians like Sen. Bernie Sanders (I-VT) and Rep.-elect Alexandria Ocasio-Cortez (D-NY). “This Fox News judge does a great job explaining why President Trump is in real trouble,” Sanders tweeted earlier this month.

Indeed, Napolitano has spent a significant amount of time concisely explaining for Fox News viewers how the president is sinking further into trouble.

Several weeks ago, he bluntly said Trump likely committed a felony by directing illegal payments to two women who claimed they had affairs with him. He vehemently disagreed with Fox Business Network host Maria Bartiromo—an ally of the president’s—over her claim that the FBI “entrapped” former National Security Adviser Michael Flynn.

He patiently explained for the frequently puzzled hosts of Fox & Friends, Trump’s favorite cable gabfest, how the president does not have the authority to end birthright citizenship through executive order. Napolitano also informed the Friends—who scrambled to defend their most loyal viewer—how Trump’s own tweets could help Special Counsel Robert Mueller build an obstruction of justice case.

And he told right-wing Fox Business Network host Stuart Varney that CNN had a very solid legal case against the White House after it revoked correspondent Jim Acosta’s press badge over a tense exchange with the president.

While the ex-judge is far from alone in his convictions on any of these topics, observers have taken notice because of how starkly his commentary runs counter to those of the Trump-boosting stars who host him on their Fox News and Fox Business Network programs.

Napolitano has emerged as a frequent foil, for example, to Fox News personalities like former judge Jeanine Pirro and Gregg Jarrett, two of the network’s most ardent Trump defenders who constantly rail against the Mueller investigation as a “hoax” and have revitalized their TV careers in doing so.

As the network’s principled libertarian legal analyst, Napolitano has dedicated a significant amount of his airtime over the past 20 months to criticizing Trump and warning of the legal trouble he could be in as a result of the Mueller probe and the SDNY investigation into his payments to two adult-film stars during the 2016 campaign.

In fact, the very first episode of Napolitano’s own show on Fox Nation—the network’s new web-only streaming service—focused on whether Trump could be impeached. And during a segment titled “Things I Hate,” Napolitano criticized Trump for a number of recent decisions, including his mocking of Mueller, his refusal to criticize Saudi Arabia for its involvement in the murder of Washington Post columnist Jamal Khashoggi, and his tantrums suggesting the U.S. should start a state-sponsored television network to cover him more favorably.

In the last two months, the former New Jersey superior court judge has written a number of op-eds for the Fox News website, including one warning how Trump’s acting attorney general Matt Whitaker has “an attraction to legal thinking that is profoundly at odds with 215 years of consistent American jurisprudence” and should terrify the average American.

His shift into the media’s favorite cable news truth-teller has caught the eye of many observers, but for longtime observers of the judge’s career, it is not surprising.

A longtime libertarian, Napolitano’s skepticism of all things government has occasionally cut against Fox News orthodoxy. Former Fox News chief Roger Ailes once reportedly scolded the judge for saying former President George W. Bush and Vice President Dick Cheney should be prosecuted for “torturing, for spying, for arresting without warrant.”

And Napolitano hasn’t always been a favorite among left-leaning observers either: as a devout Catholic, he has spoken out against abortion; he has criticized Abraham Lincoln for waging the Civil War; and flirted with 9/11 conspiracy theories, once gaining a fan in Alex Jones.

While his recent on-air barbs have delighted critics of the president’s favorite cable network, it’s unclear where Napolitano personally stands with the president, who maintains a friendly relationship with a number of Fox News stars.

Trump and Napolitano have known each other for years, as the judge lives in one of Trump’s buildings in New York. Napolitano acknowledged on Fox News last year that he had spoken with Trump repeatedly since the election, and reportedly told friends he was on Trump’s shortlist for a Supreme Court nomination.

Napolitano joins a small group of right-leaning contributors who have recently crossed the president and diverged from Fox’s brand of Trump-boosting. One such contributor, Ret. Lt. Col. Ralph Peters, left the network earlier this year, writing in a scathing letter how he was infuriated by the network’s coverage of Russian meddling in the 2016 presidential election. Fox News responded, saying Peters was using his opinion "as a weapon in order to gain attention."

“Fox News is assaulting our constitutional order and the rule of law, while fostering corrosive and unjustified paranoia among viewers,” he wrote in the email. “Over my decade with Fox, I long was proud of the association. Now I am ashamed.”

But despite his disagreements with Fox News hosts over legal issues, the likelihood of Napolitano following Peters’ path is slim.

The affable judge remains well-liked in the building, and people close to him told The Daily Beast he is content with and loyal to the network. He continues to get booked regularly on shows and has free reign over his Fox Nation streaming show.

Fox News did not make Napolitano available for an interview, and Napolitano did not return a request for comment.