On Aug. 25, President Trump pardoned the former sheriff of Maricopa County, Ariz., Joe Arpaio. Ten years ago, a lawsuit was filed against Mr. Arpaio, which stated that his office had illegally targeted Latinos in its efforts to identify and apprehend undocumented immigrants. Under “America’s toughest sheriff,” as Mr. Arpaio often called himself, officers detained citizens who had not committed serious crimes but whom they merely suspected of being undocumented. In 2011, a federal judge ordered the sheriff to end the practice. Just last month Mr. Arpaio was found to be in criminal contempt for ignoring the order, and faced up to six months in jail.

In a statement released following the president’s pardon, the Trump administration described the former sheriff’s work as “admirable service to our nation,” adding that Mr. Arpaio’s methods focused on “protecting the public from the scourges of crime and illegal immigration.” On Twitter, the president even called him an “American Patriot.”

The outcry over the president’s pardon has been swift has come from both sides of the political aisle. Arizona republican Senator John McCain expressed his disapproval of the pardon, which he said demonstrates the president’s disregard for the rule of law; and Speaker of the House Paul Ryan also said through a spokesperson that he does not agree with Mr. Trump’s actions.

Despite the criticism, the president’s acts are entirely legal. Almost all of Mr. Trump’s predecessors, including Barack Obama and George W. Bush, issued their own pardons while in office. However, unlike past pardons, Mr. Trump has pardoned the former sheriff before a sentence had been declared, and he has undermined the judicial branch by pardoning someone, not primarily to spare him punishment, but to nullify a court judgment that ran counter to the president’s political goals.

Given the nearly unlimited constitutional scope of the president’s power to pardon, there is no immediate, viable remedy to the president’s action. But this should not prevent Americans from naming it for what it is: a cynical, partisan inversion of the “lock her up” chant used by Mr. Trump’s supporters against Hillary Clinton in last year’s campaign. More disturbing, the president’s pardon of Mr. Arpaio undermines the rule of law, which is the bedrock principle on which our constitutional system rests and sends a powerful signal to Latinos and others that the enforcement of their civil rights is subject to presidential whim.