Joe Arpaio has reigned as Sheriff of Arizona’s largest county, Maricopa, since 1993, when Latinos made up less than a fifth of the state’s population. In this time, he has forced prisoners to wear pink underwear, don striped black-and-white jumpsuits, work chain gangs, and serve time beneath the desert sun in Army-surplus tents. He calls it his “concentration camp.” Most famously, he has dispatched his deputies to largely Latino neighborhoods where officers arrest people with the goal of checking their immigration status, then queue them up for deportation. It is for continuing these immigration sweeps against a federal judge’s injunction that Arpaio was officially charged Tuesday with misdemeanor contempt of court.

Arpaio has embraced controversy, and has repeatedly won re-election. After six terms in office, it seemed only age would defeat the 84 year old. But this election year appears different—not only because Arpaio faces a misdemeanor and up to six months in jail, but because polls give his Democratic rival, Paul Penzone, a comfortable lead. Arpaio’s last election was called his toughest yet, but this one may be his last.

This very real specter of Arpaio serving time is the culmination of a long battle in which the sheriff has offered himself as savior of law and order, waging war against Latino migrant hordes knocking on the Southern border wall, and as a lawman rallying against a conniving liberal federal government. “If anybody out there believes that this decision is anything but pure politics and politically motivated,” Arpaio’s campaign manager, Chad Willems, said of the federal charges, “they are living on a different planet."

It is indeed a different planet Arpaio has created. In 2007 he set up a hotline where residents could report people they believed to be in the country illegally. Latinos in Maricopa are four to nine times more likely to be pulled over by deputies than non-Latinos, their homes can be searched without a warrant, they can be detained without cause, and can be sent to jail for 13 days for failing to use a turn signal.

In 2011, the U.S. Department of Justice (DOJ) concluded its three-year investigation into the Maricopa County Sheriff’s Office and one federal investigator called it the “most egregious” case of “racial profiling in the United States.” Arpaio preferred to call them “crime-suppression operations,” but his immigration sweeps were thinly veiled excuses to act as Border Patrol, stopping anyone with brown skin. One especially besieged town was Guadalupe, a Phoenix suburb of 5,500 people, where businesses post signs in Spanish. Today, 72 percent of the town’s citizens are of Latino origin. Arpaio turned it into his own U.S.-Mexico border war after Guadalupe’s then mayor, Rebecca Jimenez, defied him as he spoke to TV reporters during an immigration sweep and said she didn’t want his deputies back in her town the next day.

“You said you didn't want us back here tomorrow. Is that what you said?" Arpaio asked.

"Well,” he said, “we will be back here tomorrow. Full force!"

And they were.

Arpaio continued his sweeps in Guadalupe, and across the county, even after the federal government took away his legal ability to do so in 2010, and even after a federal judge’s issued an injunction in 2012 that forbade him from doing so. This is what landed him in court. It began in 2007 when Arpaio’s deputies pulled over a car in which Manuel Ortega Melendres, a Mexican citizen in the country on a valid visa, was a passenger. Deputies said they stopped the car for speeding, but they never issued a citation. Even though Ortega had proper identification, deputies arrested him and sent him to county jail so an Immigration and Customs Enforcement official could look over his papers. He was eventually let go. Then in 2008 deputies stopped a brother and sister, both U.S. citizens, checked their IDs, released them. But other deputies stopped them further down the road and held them at gunpoint. These became two cases in a class-action suit against the sheriff’s department brought by the American Civil Liberties Union, cases that eventually gained the attention of federal investigators.

By 2011 Arizona U.S. District Court Judge Murray Snow ordered Arpaio to stop detaining people solely based on the belief they were in the country illegally. Arpaio continued to do so. In 2012—also an election year—Arpaio appeared in court at a six-day bench trial where he testified his department does not “arrest people because of the color of their skin.” Arpaio won that year’s election, and by 2013 the judge ruled his department had indeed arrested people based on the color of their skin. From now on the sheriff’s department was supposed to comply with the federal court’s remedies to fix racial profiling. Arpaio never did (three years out he still hasn’t). And he didn’t try to hide his defiance either. In a video shot in 2013, Arpaio’s chief deputy tells his agents the racial-profiling order is “ludicrous” and “crap.” Arpaio tells the deputies, “We don’t racially profile, I don’t care what everybody says.”

It’s that attitude, coupled with his self-proclaimed “America’s Toughest Sheriff” monicker and his tough words on illegal immigration, that made him a darling of national and local GOP candidates seeking to burnish their anti-immigration credentials.

In March 2014 Arpaio sent an email to his followers asking financial support to defend himself against Obama, the DOJ, and Democrats, whom he accused of waging a smear campaign, and sussing up the“rampant UNFOUNDED charges of racism and racial profiling." This, along with his comments in the 2013 video on racial profiling, earned Arpaio a reprimand from Judge Snow, but it’s what happened next that changed the story from defiance to conspiracy.

In May 2014, a deputy on Arpaio’s immigration-sweep team who’d been arrested on drug charges hung himself on his pool table, leaving behind a video-taped suicide note in which he threatened to expose the sheriff’s office. Deputies department wide, including those on the immigration-sweep team, had made thousands of audio and video recordings of traffic stops and never turned them over to plaintiffs in the Melendres case. When investigators searched the dead deputy’s home, they found some of these recordings and, along with drugs and illegal weapons, hundreds of stolen IDs, Mexican passports, licenses, Social Security cards, all believed to have been confiscated during traffic stops and deliberately hidden. Judge Snow asked Arpaio to turn over the tapes, as well as those from recorded interactions with deputies across the department, and to gather them quietly to avoid tempting deputies to destroy or lose evidence. Instead, Arpaio’s office sent out a mass email alerting supervisors.

The civil contempt of court hearing began in April 2015. Arpaio had repeatedly ignored the injunction to stop his immigration sweeps, he resisted department reforms, and now the court learned he failed to turn over thousands of recorded traffic-stop interactions. Arpaio admitted guilt before the hearing began, hoping to avoid a trial, and possibly to avoid talking about a private investigator the sheriff’s office hired for $250,000 to based entirely on a tip he received through Facebook—an alleged plot to oust him involving Snow, his wife, and the U.S. Justice Department.

It wasn’t until May 2016 that the civil case would be resolved, when Snow found Arpaio guilty of contempt. But in the interim, Arpaio’s staff threw him a party for being the longest-serving sheriff in Maricopa’s history; he failed to turn over 50 hard drives related to the conspiracy investigation; and U.S. Marshals seized evidence from the sheriff’s office.

To the news that Snow intended to seek criminal charges against him, Arpaio said: “It is clear that the corrupt Obama Justice Department is trying to influence my re-election as Sheriff of Maricopa County.”

Despite already admitting guilt to nearly the same charges in the civil trial, Arpaio vowed to “fight this case tooth and nail because I know these charges are rubbish.”

So is this the last ride of Sheriff Joe?

Arizona is now one-third Latino, and the red state Arpaio entered office in is now hued purple. There is some evidence Arizona Republicans are realizing they won’t be able to win without these voters: In 2011 voters recalled state Senate President Russell Pearce, the author of SB 1070, Arizona’s tough immigration law, and the state’s most anti-immigration politician. Then in the 2012 primary election, Pearce was beaten by a moderate conservative candidate. Arpaio has never done well among Latinos, but even his former base seems to have grown tired of his antics; this racial-profiling case alone is expected to cost taxpayers in Maricopa $72 million, and that’s a drop in the bucket of the many, many lawsuits Arpaio has been—and is still—entangled in. The recent poll of Maricopa residents who voted in three of the last four elections found Arpaio is losing among men, independents, and voters ages 50-64. The only group Arpaio is carrying is the elderly.

Some Maricopa voters have shown they’re willing to vote repeatedly for a man accused of racial profiling, but a potential convict? Maybe not.