Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump on Friday pardoned former Arizona sheriff Joe Arpaio, who was convicted of criminal contempt for ignoring a judge’s order not to detain suspected undocumented immigrants, the White House said.

Trump at a campaign-style rally in Phoenix strongly suggested he would pardon Arpaio, the former sheriff of Maricopa County. Arpaio had said he would appeal his conviction on misdemeanor contempt.

"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.

"Sheriff Joe Arpaio is now eighty-five years old, and after more than fifty years of admirable service to our Nation, he is worthy candidate for a Presidential pardon," the White House statement said.

A judge ruled on July 31 that Arpaio committed a crime by disobeying a court order to stop detaining suspected undocumented immigrants.

In 2013, a judge found Arpaio and his deputies had engaged in racial profiling against Latinos, backing up the findings of a 2011 Justice Department report.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Arpaio said in a phone interview with NBC News that his attorneys were made aware of the decision to pardon him several hours before it was announced.

Arpaio said he believes he is vindicated, and will hold a press conference on Monday.

"I'm very appreciative of what the president has done," Arpaio said. "Right now, I have to thank the president for standing by me and standing by law enforcement. And I'm very humbled."

I am pleased to inform you that I have just granted a full Pardon to 85 year old American patriot Sheriff Joe Arpaio. He kept Arizona safe! — Donald J. Trump (@realDonaldTrump) August 26, 2017

Critics said this week that a presidential pardon would endorse racism against Latinos. The American Civil Liberties Union said "Trump has chosen lawlessness over justice, division over unity, hurt over healing," and called the pardon "a presidential endorsement of racism."

Republican Sen. John McCain of Arizona criticized the pardon. He said in a statement that "no one is above the law" and that Arpaio was found guilty "for continuing to illegally profile Latinos living in Arizona based on their perceived immigration status in violation of a judge's orders."

"The President has the authority to make this pardon, 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," McCain said.

Republican Arizona Sen. Jeff Flake said of the pardon on Twitter: "I would have preferred that the President honor the judicial process and let it take its course."

Phoenix Mayor Greg Stanton, a Democrat, called the pardon a "slap in the face" to the people of Maricopa County and said Arpaio "targeted and terrorized Latino families because of the color of their skin." The NAACP called the pardon an "explicit embrace of the racist policing practices that leave communities fearful."

Arpaio's sentencing phase was set to start on Oct. 5.

Arpaio served as sheriff for 24 years before losing his re-election bid last November. He was known for controversial policies — including jailing prisoners in a tent city and forcing detainees to wear pink underwear — that made him popular with some on the right.

Republican Arizona Gov. Doug Ducey called Arpaio a friend and said "Sheriff Joe deserves credit for helping to reduce crime in Maricopa County over his long career." Ducey said in a statement that the pardon "has brought finality to this chapter in Arizona's history."

Trump at a rally in Phoenix on Tuesday strongly hinted at a pardon, telling the crowd: "I'll make a prediction. I think he's going to be just fine."

Arpaio endorsed Trump during the 2016 presidential campaign. The former sheriff said Friday that he supported the president no matter what decision was made about a pardon. "I'm with him to the end," Arpaio said.