It was no secret that Mr. Arpaio’s methods often crossed the line into the not-so-legal. In 2011, a federal district judge ordered the sheriff to end his practice of stopping and detaining people on no other grounds than suspecting them of being undocumented immigrants. Mr. Arpaio declined to oblige, secure in the rightness of his own judgment. The legal battle dragged on until last summer , when he was found guilty of criminal contempt of court for blatantly thumbing his nose at the law.

Such unwillingness to bow to an uppity judiciary surely impressed Mr. Trump, who sees his own judgment as superior to any moral or legal precept. In this way, Mr. Arpaio was arguably the perfect pick to be the very first person pardoned by this president. The two men are brothers in arms, fighting the good fight against the invading hordes of immigrants — and their liberal enablers, of course. And if that requires dismissing the Constitution and destroying the rule of law, so be it. What true patriot would object to a few tent cities or human rights violations when the American way of life is in mortal peril?

In announcing the pardon last August, Mr. Trump praised Mr. Arpaio as an “American patriot.” The official statement by the White House gushed: “Throughout his time as Sheriff, Arpaio continued his life’s work of protecting the public from the scourges of crime and illegal immigration.” To Mr. Trump’s fans, this was another welcome sign of the president’s commitment to keeping them safe from The Other.

Not everyone in the president’s party was pleased. Members of his administration reportedly advised against the pardon as too controversial. It was widely noted that the announcement was made in the hours right before Hurricane Harvey slammed the Gulf Coast, presumably with an eye toward minimizing the negative media coverage of the pardon while journalists were busy reporting on the storm. (For his part, Mr. Trump later claimed that the pardon actually had been timed to take advantage of the higher ratings generated by Harvey watchers.)

Even so, John McCain, the Arizona senator and frequent Trump critic who passed away on Saturday, made his dismay known. “The president has the authority to make this pardon,” he said in a statement , “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.”

Certainly, Mr. Arpaio showed little sign of remorse on the campaign trail. In a recent interview with The Times, he rambled about all the Mexican rapists and murderers who filled his jails back in the day, and he said the answer to the debate over Dreamers was simple: Deport all 700,000 of them back to their home countries.

The former sheriff also made clear that, despite all the legal drama swirling around the president, his loyalty to Mr. Trump was steadfast. “You can’t support people just because they’re convicted?” he asked rhetorically. “No matter what he’s convicted of, I’m still going to call it a witch hunt, so of course I’ll stand by him.”