Joe Arpaio, the controversial former sheriff known for his harsh immigration tactics, has failed in a bid to regain his old job in the US state of Arizona.
The self-confessed “toughest sheriff” was beaten in the Republican primary for the role in Maricopa County by his former deputy.
Mr Arpaio, 88, was convicted of criminal contempt after defying a court order to stop traffic patrols targeting suspected undocumented immigrants.
He was pardoned by President Trump.
Mr Arpaio said this year’s race was his last attempt to run for public office. In 2018, he lost a bid to run for US Senate in Arizona.
Mr Arpaio, who was sheriff for 24 years, lost by about 6,000 votes, according to the Maricopa County Elections Department.
His former aide Jerry Sheridan will now face Democrat Paul Penzone who removed Mr Arpaio from office in 2016 in a landslide victory.
In the run up to the election, Mr Arpaio vowed to continue his controversial policing tactics with policies that included housing county jail inmates in tents and regular immigration sweeps.
During his time as sheriff, he housed inmates in tents, forced them to wear pink underwear and brought back chain gangs.
He rose to national prominence for his sweeps of undocumented immigrants in Hispanic communities and for detaining Spanish-speakers under suspicion of being in the country irregularly.
Mr Arpaio was convicted in July 2011 of deliberately violating an injunction halting his practice of detaining migrants who are not suspected of having committed a state crime. Only federal officers have jurisdiction over immigration.
He faced six months in jail but was benefited by President Donald Trump’s first presidential pardon.
Mr Arpaio was among the earliest supporters of Mr Trump and frequently appeared on the campaign trail with him in 2016.
This week’s election was seen as a test for how the anti-immigration message, similar to that of Mr Trump, would be received by voters ahead of the November election.
Speaking to the New York Times, Mr Arpaio said this year’s attempt at public office would be his last. He said his age was working against him.
“I guess I lost by 1%, but I’m still the longest-serving sheriff in the history of Maricopa County. Nobody is going to beat that one,” he said.