Donald Trump pardoned notorious former Arizona sheriff Joe Arpaio on Friday night. It was the first time Trump has used the power afforded to the presidency and, perhaps, the most controversial use of that power in modern history.

The timing of the decision says as much about the tricky politics facing Trump as it does the broader trends that are reshaping American politics. Trump made the move at the most optimal time to bury it: roughly 8 p.m. on a Friday night, as a massive hurricane bore down on the United States. The pardoning of Arpaio, who is known for his vehement, anti-immigrant viewpoints, also comes as the Trump administration is reportedly set to roll back protections for certain undocumented immigrants under the program known as DACA.

The pardon sent shock waves in legal communities for how little apparent preparation was behind it. Arpaio had yet to actually be sentenced. He was infamous for exploding the number of people in his jail by targeting and jailing undocumented immigrants. And his prisons were hell. As NPR reported in 2009, Arpaio “deprived the inmates of basic necessities and reduced the meals to two per day while cutting the cost of each meal to 30 cents… Under such conditions, inmates are always hungry and have suffered drastic physical repercussions; one teenager reported losing 50 pounds since he was incarcerated.”

In July of this year, Arpaio was convicted of criminal contempt for violating a 2011 order that barred him from detaining individuals based on suspicion of their legal status. It was hailed as a massive victory within immigrant advocacy circles, but also among legal observers who felt he had drastically violated federal law. His pardon left those same individuals despondent.

“With his pardon of Arpaio, Trump has chosen lawlessness over justice, division over unity, hurt over healing,” ACLU Deputy Legal Director Cecillia Wang said in a statement. “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.”

Traditionally, the Office of the Pardon Attorney at the Department of Justice makes recommendations over who should be pardoned. Those recommendations eventually make their way to the White House, at which point they are vetted by the White House counsel’s office before going to the president. It’s unclear if any of those processes were followed in this case. Indeed, late this week the White House was signaling that no decision was imminent on Arpaio even though Trump had hinted a pardon would be coming at a rally early in the week in Phoenix.

But Trump has the authority to issues pardons however he pleases. And he chose on Friday to make his first a decidedly political recipient.

“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 85 years old, and after more than fifty years of admirable service to our Nation, he is worthy candidate for a Presidential pardon.”

The Arpaio pardon could roil an already contentious Republican Senate primary in Arizona. Kelli Ward, a state senator mounting a challenge against incumbent Sen. Jeff Flake (R-AZ) tweeted her approval of the decision shortly after it came down. Flake, by contrast, expressed disagreement with the decision, though in subdued tones.

—with additional reporting by Gideon Resnick