Controversial former Arizona sheriff Joe Arpaio (R) -- who endorsed Donald Trump during his presidential campaign last year

US President Donald Trump on Friday pardoned controversial former Arizona sheriff Joe Arpaio, who had been convicted last month of criminal contempt for illegally targeting Hispanic immigrants.

In his first act of presidential clemency, Trump pardoned the deeply divisive 85-year-old Arpaio, who ignored a federal court order that he stop detaining illegal migrants.

"He kept Arizona safe!" Trump tweeted, calling Arpaio a "patriot."

The move earned immediate scorn from Democrats and rights groups, who accused the Republican billionaire -- still reeling from the fallout over his remarks on unrest in Charlottesville -- of seeking to divide the country.

In a statement, the White House said Arpaio -- who made detainees wear pink underwear and housed them in tented desert camps -- had "more than fifty years of admirable service to our nation."

The former sheriff of Maricopa County, who reveled in his reputation as "America's toughest sheriff," had been due to be sentenced in October.

Trump foreshadowed the announcement during a meandering speech in Arizona earlier this week, when he suggested Arpaio was convicted for "doing his job."

"You know what, I'll make a prediction: I think he's going to be just fine," Trump said.

"I won't do it tonight because I don't want to cause any controversy. But Sheriff Joe should feel good."

Arpaio tweeted that he was "incredibly grateful" to Trump, and suggested his conviction was "a political witch hunt by holdovers in the Obama justice department!"

He also asked supporters to donate to his legal defense fund.

- 'Worthy' of a pardon, or a 'bigot'? -

Trump has made appeals to the far-right, refusing to condemn white supremacists while targeting migrants who came across the southern border.

"Throughout his time as sheriff, Arpaio continued his life's work of protecting the public from the scourges of crime and illegal immigration," the White House said in a statement.

"Sheriff Joe Arpaio is now eighty-five years old, and after more than fifty years of admirable service to our nation, he is a worthy candidate for a presidential pardon."

The announcement still came as a shock for many.

"Joe Arpaio is a bigot who targeted the Hispanic community for years. He should have served his time," said Democratic Congressman Joaquin Castro.

The American Civil Liberties Union, a leading civil rights group, expressed outrage.

"With his pardon of Arpaio, Trump has chosen lawlessness over justice, division over unity, hurt over healing," said the ACLU's deputy legal director Cecillia Wang.

"Once again, the president has acted in support of illegal, failed immigration enforcement practices that target people of color and have been struck down by the courts. His pardon of Arpaio is a presidential endorsement of racism."

UnidosUS, the largest Hispanic rights advocacy group in the country, decried the pardon as "obscene."

"Sheriff Joe Arpaio was the instigator of racial profiling and made official a policy of harassment and abuse based on the color of one’s skin in Maricopa County," said UnidosUS president Janet Murguia.

"And tonight, president Trump gave the blessing of his administration to pursue those disgraceful and unlawful policies in every state and locality in the land."

The US constitution offers the president almost unlimited pardon powers.

Conservative commentator Bill Kristol suggested the pardon "gets people used" to the idea of presidential pardons as the FBI investigation into the Trump campaign's alleged collusion with Russia deepens.

Source: AFP