A federal judge has dismissed a lawsuit Joseph Arpaio brought against CNN and the liberal network’s boss, Jeff Zucker.

Arpaio claimed CNN smeared him because of “leftist enmity,” but a judge ruled on Thursday that malice wasn’t proven despite the former sheriff’s claim that he was humiliated by CNN’s error.

Arpaio, who served as the sheriff of Maricopa County, Arizona from 1993 to 2016, claimed that CNN aired defamatory statements concerning his 2017 criminal contempt of court conviction by erroneously implying that he had spent time in prison and been convicted of a felony.

CNN STAFFERS BASH NETWORK’S LIBERAL BIAS, JEFF ZUCKER GOES AFTER TRUMP IN SECRET RECORDINGS

The incident occurred in 2018, when CNN’s Chris Cuomo said Arpaio was a “convicted felon” before correcting himself and noting that he was convicted of a misdemeanor. Arpaio was found guilty of criminal contempt for allegedly defying a judge's 2011 order to stop patrols targeting immigrants -- but he was eventually pardoned by President Trump.

Maricopa County Sheriff Joe Arpaio announces newly launched program aimed at providing security around schools in Anthem, Arizona, U.S. January 9, 2013. REUTERS/Laura Segall/File Photo - TM3ECAP1FKH01

During his career as a sheriff, Joe Arpaio focused his attention on illegal immigration. (Reuters/Laura Segall)

Arpaio, who called himself "America's toughest sheriff" during his 24-year run, claimed that CNN’s digital coverage of the segment did not include Cuomo’s correction and left viewers thinking he was actually a convicted felon.

PROJECT VERITAS’ ALLEGED CNN WHISTLEBLOWER CLAIMS NETWORK IS ‘PUMPING OUT PROPAGANDA'

As a result, Arpaio alleged that defendants Zucker, Cuomo and CNN “acted in concert and with actual malice to defame him," leading to “widespread ridicule and humiliation.”

Arpaio felt CNN’s error was motivated by “malice and leftist enmity,” but the judge didn’t agree it was enough to move forward.

TRUMP SAYS AMERICA WOULD BE BETTER OFF WITHOUT 'CNNs OF THE WORLD' AFTER FIERY NEWS CONFERENCE

CNN President Jeff Zucker. (REUTERS/Lucas Jackson)

“Even assuming the alleged ‘leftist enmity’ is real, the motivations behind defendants’ communications --inspired by political differences or otherwise -- do not impact whether defendants acted with actual malice as a matter of law,” Judge Royce C. Lamberth wrote.

Rolling Stone magazine and the Huffington Post also referred to Arpaio as a felon and were named in the suit, too.

The judge indicated that “defendants argued that the statements were substantially true, but even if they were not, Mr. Arpaio has not alleged any facts tending to prove actual malice.”

CLICK HERE TO GET THE FOX NEWS APP

The judge added that “nothing in this opinion should be understood to be an endorsement of defendants’ errors,” and the court recognizes that mistakes--“honest ones or otherwise”--often harm public figures such as Arpaio.

U.S. Democratic presidential candidate Hillary Clinton (L) participates in a town hall event with presenter Chris Cuomo hosted by CNN in Columbia, South Carolina February 23, 2016.   REUTERS/Rainier Ehrhardt - GF10000320912

CNN’s Chris Cuomo. (REUTERS)

“But the courts ultimately must vigorously protect the First Amendment rights of journalists and the press to issue their reports, unless there is some evidence of actual malice attributable to them, the judge wrote. "Unfortunately, Mr. Arpaio has failed to meet his burden here."

Arpaio developed a reputation for providing punitive punishment to jail inmates and cracking down on illegal immigrants.

He opened up an outdoor jail, known as "Tent City," in the desert, where temperatures often reached triple digits, and made inmates wear pink garments and jumpsuits, earning him national headlines.

Fox News’ Louis Casiano contributed to this report.