Maricopa County has a new sheriff in town.

Democrat Paul Penzone beat long-standing Maricopa County Sheriff Joe Arpaio Tuesday in a campaign that featured plenty of attacks on both sides.

Arpaio, who has been sheriff since 1993, is still in the midst of criminal contempt charges for continuing to profile Latino drivers after a federal judge barred him from doing so.

Polls had Penzone up in recent weeks -- and Grammy Award-winning singer John Legend even stumped for the former Phoenix police officer.

Arpaio represented the last vestige of a movement started a decade ago by Arizona politicians who advocated for local police to crack down on illegal immigration.

He attached himself to Donald Trump, but the alliance could not overshadow what became a repudiation of Arpaio's mounting legal woes and costs to taxpayers stemming from his traffic patrols targeting immigrants.

His downfall proved partly tied to the criminal contempt-of-court charge.

CLICK EACH SECTION FOR MORE: