Sen. John McCain (R-AZ) criticized President Trump’s decision to pardon former Maricopa County, Arizona, Sheriff Joe Arpaio Friday, saying that it “undermines his claim for the respect of the rule of law.”

“Mr. Arpaio was found guilty of criminal contempt for continuing to illegally profile Latinos living in Arizona based on their perceived immigration status in violation of a judge’s orders,” McCain said in a statement.

“The President has the authority to make this pardon, but doing so at this time undermines his claim for the respect of the rule of law as Mr. Arpaio has shown no remorse for his actions.”

McCain’s Senate counterpart, Sen. Jeff Flake (R-AZ), also hammered Trump’s decision to pardon Arpaio Friday, suggesting that Trump should have let the legal system “take its course”:

Regarding the Arpaio pardon, I would have preferred that the President honor the judicial process and let it take its course. — Jeff Flake (@JeffFlake) August 26, 2017

Flake is up for re-election in 2018 and has been a vocal critic of the president since the 2016 presidential election. Trump railed against McCain and Flake, without naming them, at a rally in Phoenix this week. The president has especially hammered Flake during the past few weeks, even going as far as meeting with Flake’s primary challengers.

A federal judge convicted Arpaio of criminal contempt in July for going against a federal judge’s order not to detain people suspected of being illegal aliens. Arpaio faced up to six months in prison and several fines.

Trump pardoned Arpaio Friday evening after highlighting the 85-year-old former sheriff’s “service to his country.”

“After more than fifty years of admirable service to our nation, he is a worthy candidate for a presidential pardon,” the White House said in a statement.