The path he started on years ago led Joe Arpaio to a red-lit stage in July, his hand outstretched as thousands cheered “Trump! Trump! Trump!”

Never before had a presidential candidate so embraced the man who calls himself “America’s toughest sheriff,” a founding father of the strong-borders movement whose hardened views on immigration seemed to square up perfectly with those of the Republican nominee. Donald Trump gave Arpaio a full five minutes in front of the Republican National Committee.

It marked what probably was the last major national appearance of Arpaio’s political career.

While the sheriff never changed, the landscape around him slowly did, and on Tuesday, his constituents — now younger and more Latino — voted him out of office, ending a six-term career as the sheriff of Maricopa County. In his place, Paul Penzone — a retired police officer — will be the top lawman of the state’s most populous county.

An epilogue awaits in December, when Arpaio faces trial on charges of criminal contempt over allegations that he ignored the court’s order to stop his deputies from racial profiling.

Arpaio made headlines for housing inmates in canvas tents in the scorching Arizona temperatures and his tough talk on immigration. But when he first won election in 1992, the former Drug Enforcement Administration agent ran on a traditional platform — being tough on crime at a time it was spiking in the U.S. Within a decade, after writing an autobiography and winning reelections by wide margins, Arpaio was considered a favorite as the Republican nominee for governor, but chose not to run, instead supporting Democrat Janet Napolitano for governor.

In 2004, the Maricopa County Republican Party took its revenge, refusing to endorse Arpaio for sheriff. It was a lesson he would remember as he sought influence at the national level.

When Maricopa County Atty. Andrew Thomas won election in 2004 promising to crack down on illegal immigration amid a burgeoning border crisis and drug cartel wars in Sonora, Mexico, Arpaio took notice. He would not need the county Republicans if he could expand his base nationally.

He did, by turning to the rest of the country for campaign donations. The result was a war chest that perpetually dwarfed those of his opponents.

Never a kingmaker, Arpaio had an unfortunate penchant for backing candidates at the wrong time. He endorsed Republican Mitt Romney for president in 2008 over his home state senator, John McCain, who won the nomination. In 2011, Arpaio gave his earliest endorsement to Texas Gov. Rick Perry, who was tumbling in the polls.

The belief in Arpaio was always a belief in Phoenix as it was after its postwar population boom, when cars made it navigable and air conditioning made it habitable. His supporters, mainly older white conservatives concentrated in the faceless suburbs and mobile home parks of outer Phoenix, responded to his urging of a return to that idyll by keeping him in office by comfortable margins.

Arpaio did his part, crowding his calendar with public appearances and boasting that his name recognition in the county approached 99%.

Never a graceful speaker, Arpaio instead intoned from the pulpit, index finger extended, in a deep baritone. But aided by a former TV reporter as his right hand, Arpaio developed a savvy press strategy with the understanding that good video will always get on the air, and live video will lead newscasts. So Arpaio gave the press good video, particularly if it involved armed agents busting drug-trafficking or human-smuggling operations.

The downside to his successes was the opposition he helped galvanize. It began with Mothers Against Arpaio, a group that focused on the sheriff’s treatment of inmates under his watch. His opponents have since spread to business groups, drug-reform advocates and an expanding Latino voter base that viewed Arpaio overwhelmingly unfavorably.

Before his current court troubles, he was used to defeating federal investigators. As recently as 2012, the Justice Department cleared Arpaio of wrongdoing in a four-year abuse-of-power investigation. But in U.S. District Judge G. Murray Snow, Arpaio met his match.