The man who styled himself “America’s toughest sheriff” has lost his job.

Sheriff Joe Arpaio, of Arizona’s Maricopa County,  was defeated Tuesday in his bid for a seventh consecutive term by his Democratic challenger, Paul Penzone, a 21-year veteran Phoenix police officer.

Penzone campaigned on a reform agenda, promising tough law enforcement without racial profiling, a practice for which Arpaio became notorious as he crusaded against undocumented immigrants, sometimes in defiance of the federal government.

“I come from a law enforcement background,” Penzone told his supporters late Tuesday, the Arizona Republic reported. “I pursued this because I want to restore the respect, the transparency” of the sheriff’s office.

“No longer will we be known by the notoriety of one,” he said.

Arpaio’s defeat was no big surprise. He had trailed in some polls by double digits.

And, as the Los Angeles Times noted, the demographics of Maricopa County changed dramatically, becoming more liberal with an increasing number of Latino voters and more youthful voters.

Democratic hedge fund billionaire George Soros pumped tens of thousands of dollars into the campaign against Arpaio, with his spokesman denouncing him as “a stain on the justice system” in the state.

But, as the Republic reported: “It was likely Arpaio’s aggressive immigration stance that was his downfall. It alienated him from Hispanic and Democratic voters. And eventually, Republican support split as Arpaio’s enforcement measures spawned a long-running racial profiling case.”

Arpaio took office in 1993. His predecessor fell to a scandal in which two men, falsely charged with murder, won $2 million from Maricopa County. Arpaio was then 60, retired from a career with the Drug Enforcement Administration.

Over the next two dozen years as sheriff, Arpaio’s own reputation would not remain untarnished.

Under Arpaio, the county jail once again found itself paying out lawsuit settlements. A man named Scott Norberg, restrained in a chair with a towel placed over his mouth, died in 1996 of what the medical examiner determined was “positional asphyxiation,” reported the Arizona Republic. The settlement with Norberg’s family cost the county $8.25 million.

One racial profiling case, which began in 2007, ultimately cost the county more than $41 million, according to the Associated Press. A lawsuit filed by Hispanic plaintiffs argued that the sheriff’s deputies unconstitutionally targeted Latinos at traffic stops.

In 2011, U.S. District Court Judge G. Murray Snow ordered the sheriff’s office to stop detaining people solely on suspicion that they were undocumented immigrants, without reference to whether they had reason to believe they had committed a crime.

In October, Arpaio was charged with criminal contempt of court for resisting Snow’s order.

If convicted, his sentence could include jail time of up to six months. He pleaded not guilty at the end of October; the trial is set to be held Dec. 6.

The lawman was also known for a handful of strange and divisive stunts.

He clothed inmates in pink undergarments. More than 2,000 inmates lived in a “tent city” in the Arizona desert — even when the heat, the men living in the desert said, melted their sneakers. They were fed twice a day; meals included sandwich meat that had reportedly turned green with age. Arpaio reinstituted chain gangs for men, and later expanded them to include women and juvenile offenders.

The sheriff was never one to shy away from the spotlight. He recruited actor and martial artist Steven Seagal to train a volunteer posse in how to breach rooms and carry guns. One of the tasks given to the 3,500-strong posse was patrolling local malls during the winter season, the Los Angeles Times reported in 2013.

Arpaio became a hero of the right both for his militance against undocumented immigrants and for his railing against President Obama.

Even after President-elect Donald Trump conceded that Obama was born in the United States, Arpaio clung to the birther myth.

But of all the mantles he took up, Arpaio’s cause celebre was tackling illegal immigration. This also meant he was an early and outspoken Trump supporter.

In a speech at the Republican National Convention, the sheriff declared that, “We are more concerned with the rights of illegal immigrants than we are the citizens of our own country.”

Penzone, who failed to beat Arpaio in 2012, won by about 10 percentage points, Reuters reported.

“We want to congratulate Paul Penzone on his victory and look forward to working with him on a seamless transition,” Arpaio said in a statement released Tuesday. “My thanks and appreciation to the people of Maricopa County for the faith and trust they put in me over the years.”

More from Morning Mix