Voters have booted Sheriff Joe Arpaio from office in his bid for a seventh term after his legal problems in a racial profiling case culminated in a criminal charge two weeks before Election Day.

Arpaio, an 84-year-old Republican who became a national figure by cracking down on illegal immigration and forcing jail inmates to wear pink underwear, lost to Democrat Paul Penzone.

The race became a referendum on Arpaio's legal woes. Federal prosecutors brought a contempt-of-court charge stemming from his defiance of a judge's order to stop carrying out patrols targeting Latinos.

Arpaio has faced criminal investigations in the past without being charged or losing his seat. That changed Tuesday despite a devoted base of supporters and strong fundraising, mainly from out-of-state donors.

He still faces the possibility of jail time.