Maricopa County Sheriff Joe Arpaio speaks at a news conference in Phoenix in 2013. (Ross D. Franklin/AP)

Vice President Pence called former Maricopa County Sheriff Joe Arpaio, who was convicted of contempt of court last year, a champion of “the rule of law” and said he was honored by his attendance at an event with him Tuesday in Arizona.

President Trump pardoned Arpaio last year after his conviction on a misdemeanor contempt of court charge for ignoring a federal judge’s order to stop detaining people because he merely suspected them of being undocumented immigrants. Arpaio is now a primary candidate for the Republican nomination to succeed the retiring Sen. Jeff Flake (R-Ariz.).

During remarks at an event in Tempe, Ariz., on tax cuts, Pence acknowledged Arpaio was in the room, suggesting he had not expected to see him.

“I just found out when I was walking through the door that we were also going to be joined by another favorite, a great friend of this president, a tireless champion of strong borders and the rule of law, who spent a lifetime in law enforcement,” Pence said.

“I’m honored to have you here,” the vice president added.

Arpaio’s critics spent years trying to stop police practices under Arpaio that they charged were discriminatory and abusive.

After Trump announced his pardon of Arpaio, an official at the American Civil Liberties Union called it “a presidential endorsement of racism.”

Arpaio’s conviction has done little to dampen the praise he continues to receive from the Republican establishment.

A recent Magellan Strategies poll found Arpaio running second in a three-person race with a 67 percent favorable rating among Republican primary voters.

Arpaio has compared his prosecution, which he considers politically motivated, to Republican claims that the Obama administration improperly sought warrants to monitor officials connected to the Trump campaign.

Michael Scherer contributed to this report.