The themes of cracking down on crime and illegal immigration have been popular with voters in the past, but that narrative was turned against him this year. The two retired officers challenging Arpaio have accused metro Phoenix’s longtime sheriff of focusing too heavily on investigations that bring him publicity and ignoring many of the law enforcement duties he was hired to do.

The county to the immediate south of metro Phoenix also is voting on its sheriff’s race Tuesday. Republican incumbent Paul Babeu is vying against Democrat Kevin Taylor and Independent Ty Morgan in his bid to win a second term.

Babeu was forced to acknowledge he is gay after stories emerged of a falling out with a former lover and shirtless photos of him on a gay dating website came to light. Babeu pulled out of the race for a congressional seat after the news broke.

The 80-year-old Arpaio has been dogged by revelations that his office failed to adequately investigate hundreds of sex-crimes cases — including dozens of alleged child molestations — and allegations that his deputies have racially profiled Latinos in his trademark immigration patrols.

The sheriff’s office reopened more than 400 sex-crimes cases that were reported to the agency but were inadequately investigated or not investigated at all after they were reported over a three-year period ending in 2007.

A city that had contracted with Arpaio’s office for police services had concluded there were many cases in which sheriff’s investigators wrote no follow-up reports, collected no additional forensic evidence and made zero effort after the initial report of the crime was taken. The city concluded some cases were no longer viable, in part, because victims had either moved away or otherwise moved on.

The sheriff’s has said it has moved to clear up the inadequately investigated cases and have taken steps to prevent the problem from happening again.

While the sheriff’s immigration enforcement has made him popular among some voters, it has led to two lawsuits that alleged racial profiling in his immigration patrols.

A federal judge heard of one of the lawsuits this summer and hasn’t yet issued his ruling. The lawsuit filed by a small group of Latinos will serve as a precursor for a similar yet broad civil rights lawsuit against Arpaio by the U.S. Department of Justice.