GettyImages-578541708
Maricopa County Sheriff Joe Arpaio delivers a speech on the fourth day of the Republican National Convention on July 21, 2016 at the Quicken Loans Arena in Cleveland, Ohio. Republican presidential candidate Donald Trump received the number of votes needed to secure the party's nomination. An estimated 50,000 people are expected in Cleveland, including hundreds of protesters and members of the media. The four-day Republican National Convention kicked off on July 18 Joe Raedle/GETTY

In a controversial move, President Donald Trump pardoned Joe Arpaio, former sheriff of Maricopa County, Arizona, Friday night and announced the decision in a Twitter post. “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!” wrote the president.

Arpaio was convicted of criminal contempt of court in July for ignoring court orders to stop his aggressive enforcement of immigration laws. Arpaio described himself as “America’s toughest sheriff” and was facing up to six months in jail. Arpaio’s sentencing hearing was scheduled for October.

Arpaio has been a contentious figure for a variety of actions he took as sheriff. Arizona Federal Judge Murray Snow ruled in 2011 that Arpaio’s harsh immigration enforcement tactics constituted racial profiling. Arpaio was ordered to stop, but he didn’t. A Department of Justice investigation called his actions “the worst pattern of racial profiling by a law enforcement agency in U.S. history,” according to a 2011 piece by the Phoenix New Times.

It was found that Arpaio’s office would regularly detain people on the suspicion that they were in the U.S. illegally. This led to the detention of many innocent U.S. citizens of Latino heritage and legal immigrants.

Arpaio was first elected sheriff in 1992 and served six terms. The sheriff made immigration enforcement one of his top priorities in the early 2000s. He instructed his police force to conduct raids to search for immigrants without legal status. Arpaio forced inmates in his county jails to wear pink underwear so that the garments wouldn’t be stolen when they left jail. Pink underwear and handcuffs became part of Arpaio’s brand and he would sell the items for fundraisers.

Arpaio was criticized for the creation of “tent city,” an extension of a local jail facility where inmates live outside in tents in the sweltering Arizona heat. Human rights organizations such as Amnesty International have called the practice inhumane. Newly elected Sheriff Paul Penzone has vowed to shut it down.

Maricopa County had to pay over $1 million in a 2004 lawsuit against Arpaio in a wrongful arrest case. James Saville was arrested for an assassination plot on Arpaio, but was found not guilty. The court also ruled that Saville was entrapped by Arpaio’s sheriffs, who had set the whole plot up as a publicity stunt, according to a 2008 Phoenix New Times piece.

Arpaio was an early supporter of Trump and thanked the president for the pardon via Twitter. He also was an outspoken critic of former President Barack Obama and accused him of faking his birth certificate.

“Thank you @realdonaldtrump for seeing my conviction for what it is: a political witch hunt by holdovers in the Obama justice department!” wrote Arpaio on Twitter.

Civil rights groups were quick to criticize the president for the pardon. “A pardon of Arpaio should be seen for what it is: the latest attack on people of color by Trump,” wrote the American Civil Liberties Union on Twitter Saturday.