President Donald Trump pardoned Joe Arpaio on Friday, sparing the controversial former Arizona sheriff a jail sentence after he was convicted of criminal contempt related to his hard-line tactics going after undocumented immigrants.

The move drew outcry from civil rights groups, which accuse Arpaio of violating the Constitution in his crackdown on illegal immigration.

During last year’s presidential campaign, Arpaio was a vocal proponent of Trump’s candidacy, and used his national notoriety to advocate for Trump’s similarly aggressive stance on border security and deportations.

In a brief statement released late Friday evening, the White House praised Arpaio’s career.

“Throughout his time as sheriff, Arpaio continued his life’s work of protecting the public from the scourges of crime and illegal immigration,” the statement read. “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.”

Trump tweeted Friday night about his decision: “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!”

Groups criticize decision

Arpaio, who was sheriff in Maricopa County, Arizona, until last year, was found guilty of criminal contempt last month for disregarding a court order in a racial-profiling case. His sentencing had been scheduled for October 5.

“Not only did (Arpaio) abdicate responsibility, he announced to the world and to his subordinates that he was going to continue business as usual no matter who said otherwise,” US District Judge Susan Bolton wrote in a July 31 order finding him guilty.

However, civil rights groups and others pushed back against the possibility of Arpaio’s pardon, and slammed the decision on Friday.

“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,” the American Civil Liberties Union wrote in a statement. “His pardon of Arpaio is a presidential endorsement of racism.”

“Joe Arpaio illegally targeted and terrorized Latino families. Our community voted him out of power. Donald Trump can’t change that,” wrote Greg Stanton, the Democratic mayor of Phoenix, which sits in Maricopa County.

Arizona Sen. John McCain said in a statement on the pardon that “no one is above the law and the individuals entrusted with the privilege of being sworn law officers should always seek to be beyond reproach in their commitment to fairly enforcing the laws they swore to uphold.”

“Mr. Arpaio was found guilty of criminal contempt for continuing to illegally profile Latinos living in Arizona based on their perceived immigration status in violation of a judge’s orders,” McCain said. “The President has the authority to make this pardon, but doing so at this time undermines his claim for the respect of rule of law as Mr. Arpaio has shown no remorse for his actions.”

Arizona’s other Republican senator, Jeff Flake, wrote on Twitter that he would have “preferred that the President honor the judicial process and let it take its course.”

Trump has openly feuded with Flake over the past week.

Former acting Attorney General Sally Yates, whom Trump fired in January after she refused to defend his controversial Muslim travel ban, also slammed the pardon.

“With his pardon pen, POTUS reveals his own contempt for our Constitution, our courts, and our founding principles of equality and justice,” Yates wrote on Twitter.

Former sheriff had questioned Obama birth record

Arpaio, who has called himself “America’s toughest sheriff,” was an early Trump supporter. Like Trump, he helped fuel unfounded allegations that President Barack Obama was not born in the United States. He used frequent appearances on television to establish a national platform for his views on immigration, which relied on tough enforcement measures and racial profiling.

He became known for his treatment of those he held in an outdoor jail known as “Tent City,” where he made people wear pink underwear and work in chain gangs.

Trump’s pardon of Arpaio is the earliest a president has pardoned someone in his first term since George H.W. Bush pardoned nine individuals on August 14, 1989.

Bill Clinton waited almost two years before issuing a pardon. George W. Bush and Barack Obama both waited about a year.