US President Donald Trump has spared former Arizona sheriff Joe Arpaio the prospect of serving jail time as he granted the first pardon of his turbulent tenure.
Mr Trump's move also wiped out Mr Arpaio's recent federal conviction stemming from his immigration patrols that focused on Latinos.
The White House said Mr Arpaio, 85, was a "worthy candidate" for the pardon, citing his "life's work of protecting the public from the scourges of crime and illegal immigration".
Mr Trump granted the pardon less than a month after a judge found Mr Arpaio guilty of a charge of contempt of court.
The pardon drew a swift and harsh denunciation from an array of Latinos and political leaders, who said it amounted to presidential approval of racism.
"I appreciate what the president did," Mr Arpaio said as he celebrated the news over an Italian restaurant meal and someone in his party ordered champagne.
"I have to put it out there: Pardon, no pardon - I'll be with him as long as he's president."
"Pardoning Joe Arpaio is a slap in the face to the people of Maricopa County, especially the Latino community and those he victimised as he systematically and illegally violated their civil rights," Phoenix Mayor Greg Stanton said.
Senator John McCain criticised the move and said it undermines Mr Trump's "claim for the respect of rule of law as Mr Arpaio has shown no remorse for his actions".
Republican Governor Doug Ducey said Mr Arpaio should be given credit for his crime-fighting efforts and allowed to "move on" and enjoy his retirement.
Mr Arpaio earned a national reputation by taking aggressive action to arrest immigrants in the country illegally.
But years of legal issues and related costs took a toll on his political power at home, and he was handily defeated by a Democrat in the 2016 election.
Mr Arpaio defied court orders that he stop the patrols and has been pardoned by a president who has shown lack of respect for judges with whom he disagrees.
Mr Trump has had harsh words about judges overseeing the case against his now-defunct Trump University and his travel ban.
"So Sheriff Joe was convicted for doing his job?" Trump asked supporters. "I'll make a prediction. I think he's going to be just fine."
Critics say the Arpaio pardon removed the last opportunity to hold him accountable for what they say is a long history of misconduct, including a 2013 civil verdict in which the sheriff's officers were found to have racially profiled Latinos in his immigration patrols.
He was accused of prolonging the patrols for 17 months after a judge had ordered them stopped so that he could promote his immigration enforcement efforts in a bid to boost his successful 2012 re-election campaign.