After 23 years of flouting constitutional rights, federal court orders, and common decency, Maricopa County Sheriff Joe Arpaio will no longer be an embarrassment to the U.S. criminal justice system.

Retired Phoenix police officer Paul Penzone defeated the 84-year-old Arpaio 55-44 percent in the race for Maricopa County Sheriff on Tuesday night, dealing a shocking defeat to the longtime incumbent.

Arpaio, who has cruised to reelection in past contests, was dragged down by a flood of out-of-state funding and a well-organized campaign to get out the Latino vote. Oh, and there was also the criminal contempt of court charges for refusing to comply with a federal judge's orders to improve the conditions at the county jail and to stop unconstitutionally profiling Latinos.

In a statement, Maricopa Strong, a super PAC funded by liberal mega-donor George Soros that funneled more than $2 million into the race, said the voters "rejected the poisonous anti-Immigrant policies that Arpaio symbolized."

"In this race, when matched on a more even playing field, the values of justice and inclusion defeated the politics of fear-mongering and intolerance," the super PAC said. "Maricopa County will be a safer, fairer, more just jurisdiction with Paul Penzone as sheriff. Voters have rejected the poisonous anti-immigrant policies that Arpaio symbolized."

Arpaio was an outspoken supporter of Donald Trump and his hardline immigration policies. He spoke at the Republican National Convention in July, drawing applause when he said, "Donald Trump will build the wall!" (There was a large picture of a border wall displayed behind Arpaio, just to emphasize how tremendous and bigly the wall will be.)

Trump returned the favor, telling voters to back Arpaio. But the wave of Republican votes that propelled Trump into the White House did not lift Arpaio. Nor did the backlash against Arpaio and prominence of immigration issues hurt Trump. With 97 percent of the vote counted, Trump is winning Maricopa County 49-45 percent.

Arpaio gained national name-recognition—he styled himself as "America's toughest sheriff"—for housing inmates in a desert tent city and running aggressive sweeps to round up illegal immigrants.

In 2013, Reason named Arpaio one of its 45 enemies of freedom, where he joined such luminaries as Idi Amin, Michael Bloomberg, and Hillary Clinton:

Maricopa County, Arizona's chief law enforcement officer is famous mostly for publicly degrading inmates: forcing them to live in a tent city, work on chain gangs, wear pink underwear. Meanwhile, his more serious transgressions receive far less attention. Arpaio has created citizen posses to track down and arrest illegal immigrants, overseen a jail staff that has violently abused inmates (resulting in the death of three prisoners and the paralysis of a fourth), and used law enforcement resources to harass and intimidate his political opponents.

In 2014, J.D. Tuccille noted in Reason that Arpaio's office "has also been guilty of a litany of shenanigans, including stealing documents from a defense attorney, arresting critical journalists, spying on political opponents—and maintaining such lousy jail conditions that they violate inmates' rights."

Arpaio's jails lost their national accreditation in 2008, but Arpaio continued to wrangle with a U.S. district court judge over the conditions of the jail, as well as the unconstitutional racial profiling of Latinos.

The judge referred Arpaio to the U.S. Attorney's Office for potential prosecution, and in mid-October the office charged Arpaio and three of his aides with criminal contempt of court:

[U.S. District Court Judge Susan Bolton's] filing walks through five years of the sheriff's resistance to her colleague, U.S. District Court Judge G. Murray Snow, who has presided over the long racial-profiling case out of which the criminal-contempt charge grew. The document alleges Arpaio was more interested in maintaining his famed tough-on-immigration persona than following Snow's orders. His deputies continued to arrest and deliver undocumented immigrants to federal authorities when there were no state charges against them, long after Snow banned the practice. "Judge Snow concluded that Sheriff Arpaio did so based on the notoriety he received for, and the campaign donations he received because of, his immigration enforcement activity," Bolton wrote […] The practice, she notes, continued even after Arpaio's attorneys advised him to stop. The sheriff at various points told his attorneys they would revise their protocol or, falsely, that the Sheriff's Office was already in compliance.

Now Arpaio has received an order from someone he can't try and ignore: voters.

"Tonight, the people have spoken," Arpaio said in a campaign statement on election night. "And while Ava and I are disappointed in the results we respect their decision."