Updated at 10:55 p.m. ET

President Trump formally pardoned Joe Arpaio on Friday, wielding the presidential power of mercy to absolve the former Arizona sheriff for defying a federal court order.

“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 honorable service to our Nation, he is [a] worthy candidate for a Presidential pardon.” Trump subsequently confirmed the decision on Twitter.

The pardon is Trump’s first since taking office, breaking a barrier relatively early in his tenure. Almost two years passed before Barack Obama issued nine pardons to people convicted of relatively minor offenses; George W. Bush waited only a few days longer into his first term to erase convictions for selling moonshine and stealing $11. But Trump eschewed his predecessors’ modest lead, instead wiping clean a guilty verdict for criminal contempt of court for one of his staunchest political supporters after only eight months in office.

Arpaio, who left office in January, ranks among the most controversial law-enforcement officials in American history. Phoenix-area voters elected him six times to lead the Maricopa County Sheriff’s Department, which he governed as a proto-Trumpian figure for almost a quarter-century. Arpaio’s harsh treatment of undocumented immigrants and criminal suspects brought him the adoration of Fox News viewers and multiple civil-rights lawsuits. He claimed former President Barack Obama’s birth certificate was a forgery even after Trump himself had publicly abandoned that stance. And he shared Trump’s disdain for the federal judiciary, frequently castigating the judges who oversaw lawsuits against him.

His extreme treatment of prisoners and detainees drew widespread condemnation and allegations of racial bias. A 2011 Justice Department report concluded that Arpaio engaged in “unconstitutional policing” by systematically targeting Latinos for racial profiling. That same year, in response to a lawsuit, a federal judge ordered Arpaio to stop detaining and harassing residents of largely Latino neighborhoods. He ignored the order and continued to perform sweeps, claiming they were lawful.

The judge charged him with civil contempt in 2015 and criminal contempt, a misdemeanor offense, the following year. A federal court found him guilty in July. Trump’s pardon comes before that legal process against Arpaio had finished: His sentencing hearing was scheduled for October, where he faced a maximum of six months behind bars.

Shortly after the pardon’s announcement, Arpaio told the Arizona Republic that while he didn’t know his next move, he didn’t think his political career had ended. “I told my wife that I was through with politics,” he said in an interview. “But now I've decided I'm not through with politics because of what's happening. I didn't ask for a pardon. It has nothing to do with a pardon.” Arpaio lost his reelection bid for a seventh term as Maricopa County sheriff in 2016.

News of the pardon drew condemnation from Democrats, including members of Arizona’s congressional delegation. “Arpaio hurt Arizonans & cost taxpayers a great amount of grief & money,” Representative Kyrsten Sinema, whose district is within Maricopa County, wrote on Twitter. “He should be held accountable. No one is above the law.” Phoenix Mayor Greg Stanton said the pardon “is a slap in the face to the people of Maricopa County, especially the Latino community and those he victimized as he systematically and illegally violated their civil rights.”

Arizona’s two Republican senators also expressed disappointment with the president’s decision. “Regarding the Arpaio pardon, I would have preferred that the President honor the judicial process and let it take its course,” Jeff Flake wrote on Twitter. In a statement, John McCain offered a blunter critique. “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,” the state’s senior senator said.

Civil-rights organizations that had battled with Arpaio in the courts during his tenure severely criticized the move. Cecilia Wang, the deputy legal director of the ACLU, said the president “has chosen lawlessness over justice” and that the pardon amounted to “a presidential endorsement of racism.”

Trump, whom Arpaio endorsed during the campaign, first raised the possibility of pardoning the sheriff in a Fox News interview in early August. When he traveled to Phoenix for a rally weeks later, White House officials had to publicly deny widespread speculation that he would announce the pardon there. Trump himself seemed to savor the buzz surrounding it that night and used it to fire up his assembled supporters.

“By the way, I’m just curious: Do the people in this room like Sheriff Joe?” he asked. The crowd roared in response. “So was Sheriff Joe convicted for doing his job? That’s what—he should have had a jury, but you know what? I’ll make a prediction: I think he’s going to be just fine. Okay? But I won’t do it tonight, because I don’t want to cause any controversy. Is that okay? All right?” he asked rhetorically. The audience cheered. “But Sheriff Joe can feel good,” he added.

The pardon rumors drew immediate criticism from civil-rights groups. Vanita Gupta, who led the Justice Department’s Civil Rights Division under Obama, warned that absolving Arpaio “will not be a dog whistle to the so-called ‘alt right’ and white supremacists, but a bull horn.” The ACLU, one of Arpaio’s legal foes over the years, said pardoning the former sheriff “would just be the latest injustice to befall the countless people wronged by his years of racism, lawlessness, and abuse.”

Of all the powers granted to presidents by the Constitution, pardoning is the least constrained by the other two branches of government. Congress cannot reverse pardons once issued, and the Supreme Court has long held that a president’s power to offer them “is granted without limit.” At the Constitutional Convention in 1787, the Founders explicitly rejected a proposal that would have allowed the Senate to review pardons. The Constitution itself only imposes two restrictions: that a pardon does not prevent impeachment, and that pardons only apply to federal crimes, not state crimes or civil lawsuits.

The pardoning power’s strength has its roots in the British monarchy. By the time the United States declared its independence, English kings and queens had long exercised the royal prerogative of mercy to absolve criminals of their past deeds, spare the condemned from execution, and impose conditions upon those who accepted a royal pardon. Parliament added constraints on its scope over time, and in modern practice the Queen only exercises it at the prime minister’s behest. But the Founders incorporated it into the presidency without similar restrictions.

That breadth drew some early critics. George Mason, a Virginia delegate who refused to sign the Constitution, worried about its potential for abuse. “The president of the United States has the unrestrained power of granting pardons for treason,” he warned in a pamphlet during the ratification debates, “which may be sometimes exercised to screen from punishment those whom he had secretly instigated to commit the crime, and thereby prevent a discovery of his own guilt.”

Trump’s pardon of Arpaio will likely rank among the most controversial exercises of the power. Other presidents have used it to absolve pirates, participants in tax rebellions, ex-Confederates, polygamous Mormons, socialists, anarchists, rumrunners, Puerto Rican nationalists, Vietnam War draft-dodgers, and Jimmy Hoffa. But only rarely has it been used to absolve a prominent political backer—much less one as divisive as Arpaio.