Arpaio praised the president on Twitter after the pardon
US President Trump has pardoned a former Arizona sheriff, who was found guilty of criminal contempt.
Joe Arpaio of Maricopa County, Arizona violated a federal court order that prohibited illegal detentions based on suspicions about immigration status.
The ruling stemmed from an initial lawsuit brought by Latino residents of Maricopa.
They successfully challenged policies of, what rights groups say were, racial profiling and illegal detentions.
The plaintiff class was represented by the American Civil Liberties Union (ACLU) and partner organisations.
The ACLU say Mr Arpaio "repeatedly flouted" court orders in the case, leading to both civil and criminal contempt rulings against him.
ACLU deputy legal director, Cecillia Wang, says: "With his pardon of Arpaio, Trump has chosen lawlessness over justice, division over unity, hurt over healing.
"Once again, the president has acted in support of illegal, failed immigration enforcement practices that target people of colour and have been struck down by the courts.
"His pardon of Arpaio is a presidential endorsement of racism."
Preident Trump said Mr Arpaio "kept Arizona safe", calling him an "American patriot":
I am pleased to inform you that I have just granted a full Pardon to 85 year old American patriot Sheriff Joe Arpaio. He kept Arizona safe!— Donald J. Trump (@realDonaldTrump) August 26, 2017
Tweeting after the pardon, Mr Arpaio thanked his supporters and President Trump:
Thank you @realdonaldtrump for seeing my conviction for what it is: a political witch hunt by holdovers in the Obama justice department!— Joe Arpaio (@RealSheriffJoe) August 26, 2017
I am humbled and incredibly grateful to President Trump. I look fwd to putting this chapter behind me and helping to #MAGA— Joe Arpaio (@RealSheriffJoe) August 26, 2017
I also thank my loyal supporters, who stood shoulder to shoulder w/ me in this fight, and throughout my career. For those who are asking . .— Joe Arpaio (@RealSheriffJoe) August 26, 2017
Arpaio could have faced six months in jail at his sentencing in October.
In a brief statement, the White House said: "Throughout his time as sheriff, Arpaio continued his life's work of protecting the public from the scourges of crime and illegal immigration.
"Sheriff Joe Arpaio is now 85-years-old, and after more than 50 years of admirable service to our nation, he is (a) worthy candidate for a presidential pardon."
Senate Democratic leader Chuck Schumer accused Mr Trump of unveiling Mr Arpaio's pardon in the midst of Hurricane Harvey.
He tweeted that "the only reason to do these right now is to use the cover of Hurricane Harvey to avoid scrutiny", adding it was "so sad, so weak".
Joe Arpaio ignored the courts and the rule of law in order to systematically target Latinos in AZ. The definition of racism and bigotry.— Chuck Schumer (@SenSchumer) August 26, 2017