WASHINGTON ― President Donald Trump on Friday pardoned a notorious former Arizona sheriff who willfully violated a federal judge’s order by unlawfully detaining individuals his officers claimed might be in the country illegally.

Former Maricopa County Sheriff Joe Arpaio, who had previously proclaimed himself “America’s toughest sheriff,” was convicted of criminal contempt last month for violating a 2011 order that barred Arpaio and his office from detaining individuals solely based on suspicions about their legal status. Arpaio, 85, was scheduled to be sentenced on Oct. 5.

“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 late Friday. “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.”

Trump’s pardon of Arpaio, the first of his presidency, amounts to a tacit endorsement of Arpaio’s discriminatory tactics and reads as a favor to a political ally. The media-savvy former sheriff, known for parading inmates around in pink underwear, supported the former reality TV star’s presidential campaign and spoke at the Republican National Convention last summer. Both men were prominent promoters of the racist conspiracy theory that former President Barack Obama wasn’t born in the United States.

Arpaio, who served as sheriff from 1993 through 2016, had long been accused of discriminatory practices against Latinos. A 2011 report by the U.S. Department of Justice’s Civil Rights Division concluded there was reasonable cause to believe that Arpaio and his office engaged in a pattern or practice of unlawful policing and racial profiling. Arpaio’s officers called Latinos “wetbacks,” “Mexican bitches,” “fucking Mexicans” and “stupid Mexicans,” the Justice Department found, and Latino drivers were four to nine times as likely to be stopped by his officers as non-Latino drivers were. A lawsuit filed by the Justice Department was settled in 2015.

“With his pardon of Arpaio, Trump has chosen lawlessness over justice, division over unity, hurt over healing,” Cecillia Wang, deputy legal director of the American Civil Liberties Union, said in a statement 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. His pardon of Arpaio is a presidential endorsement of racism.”

Arpaio took a break from dinner with his wife on Friday night to call into Sean Hannity’s program on Fox News. Hannity said Arpaio was “convicted ... only of criminal contempt” and said he was “very relieved” for Arpaio.

Arpaio said that it was “great” to hear about the pardon and that he loves the president.

Hannity, who apparently thought that a former sheriff charged with a federal crime would have somehow landed in his former county jail, joked with Arpaio about the conditions in Arpaio’s former facility, referencing pink underwear and the bologna sandwiches served there.

But Arpaio said incarceration wouldn’t have been that big of a deal.

“Sean, it’s federal, I could play bocce. ... It would’ve been alright,” he said.

At a Tuesday evening rally in Phoenix, Trump had signaled that the pardon was coming. The president claimed Arpaio had been “convicted for doing his job.” But Trump said, “I’ll make a prediction: I think he’s going to be just fine, OK?”

JEAN-LOUP SENSE/AFP/Getty Images As sheriff, Arpaio established -- and showed off to the media -- a "tent city" prison camp.

Ahead of his trial, the Justice Department had argued that Arpaio “viewed his defiance of the federal government’s directives on immigration as a badge of honor” and “bragged about his deputies’ contemptuous immigration enforcement practices to the press.”

In finding Arpaio guilty of criminal contempt, U.S. District Judge Susan R. Bolton said in July that the former sheriff had shown “flagrant disregard” for the 2011 order banning him from detaining people because he thought they were in the country illegally.

“Not only did Defendant 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,” Bolton ruled on July 31. “The evidence at trial proves beyond a reasonable doubt and the Court finds that Judge Snow issued a clear and definite order enjoining Defendant from detaining persons for further investigation without reasonable suspicion that a crime has been or is being committed; that Defendant knew of the order; and that Defendant willfully violated the order by failing to do anything to ensure his subordinates’ compliance and by directing them to continue to detain persons for whom no criminal charges could be filed.”

Arpaio’s lawyers have since moved for an acquittal, arguing that the government’s handling of the case reeked of “unconstitutional selective prosecution.” They questioned the court’s “motivations” in not allowing a jury trial. They also claimed that the verdict was driven by the desire “to vindicate the authority of a fellow judge.” And they argued that Arpaio had a right to be present for the issuing of the verdict, which was in fact emailed to his lawyers. The prosecution has not yet responded to the defense’s motion.

Trump’s pardon of Arpaio skipped over the typical review process for pardons, which are usually routed through the Justice Department’s Office of the Pardon Attorney.

The pardon came less than two weeks after the white supremacist rally in Charlottesville, Virginia, that turned deadly when a neo-Nazi sympathizer crashed his vehicle into a crowd of anti-racist demonstrators. Trump faced criticism for what was seen as his lackluster condemnation of white supremacists and his attempt to equate the racists in Charlottesville with those who turned out to oppose them. Civil rights advocates like Vanita Gupta, the former chief of the Justice Department’s Civil Rights Division, warned that pardoning Arpaio ― who she said “personifies the same bigotry and intolerance we witnessed in Charlottesville” ― would sow hate and division.

“If President Trump uses his power to pardon a discredited law enforcement official who persistently engaged in illegal racial profiling of the Latino community, it will not be a dog whistle to the so-called ‘alt right’ and white supremacists, but a bull horn,” Gupta said.

This is a developing story. Check back for updates.