(CNN) President Donald Trump suggested at his Phoenix rally on Tuesday that he may pardon Joe Arpaio, the controversial former Maricopa County, Arizona sheriff.

"Do the people in this room like Sheriff Joe?" he asked.

He paused as supporters applauded.

"So was Sheriff Joe convicted for doing his job?" he asked.

"You know what, I'll make a prediction: I think he's going to be just fine," Trump said. "OK? But I won't do it tonight, because I don't want to cause any controversy."

"But Sheriff Joe should feel good," the President added, hinting strongly that he would pardon Arpaio sometime in the future.

Arpaio was found guilty last month of criminal contempt for disregarding a court order in a racial profiling case.

"'Was Sheriff Joe convicted for doing his job?'" the American Civil Liberties Union tweeted, echoing Trump's question. "No, he was convicted for violating court order for discriminating against Latinos."

"Was Sheriff Joe convicted for doing his job?" No, he was convicted for violating court order for discriminating against Latinos. — ACLU National (@ACLU) August 23, 2017

Earlier in the day, White House press secretary Sarah Huckabee Sanders had said that Trump would not declare a decision on whether to pardon Arpaio

Arpaio said he wasn't going to attend Trump's rally Tuesday.

It wasn't because he didn't want to go.

"I haven't been invited," Arpaio told CNN on Monday, adding that he would go if he were invited.

Last week, the President appeared to hint that he may pardon Arpaio -- an early Trump supporter and a lightning rod for more than a decade in the immigration battle. Trump retweeted a story from Fox News last week that reported he was "seriously considering" pardoning the convicted former sheriff.

Groups such as the ACLU criticized talk of a potential pardon, saying the President would be undoing a conviction secured by career attorneys at the Justice Department.

Arpaio he said it was Trump's decision when asked if he had any comment on a possible presidential pardon.

In office for more than two decades, Arpaio called himself "America's toughest sheriff," and Republican presidential candidates often sought his endorsement.

JUST WATCHED 2013: Judge says Sheriff Arpaio was profiling Replay More Videos ... MUST WATCH 2013: Judge says Sheriff Arpaio was profiling 01:32

The lawman made cracking down on illegal immigration a priority for his deputies, a stance that gained him national notoriety. The brash, unapologetic sheriff also became a favorite of conservative cable television commentators, while immigrant rights activists viewed him as a villain.

He was accused of violating a court order by continuing patrols targeting immigrants. Arpaio has contended the order wasn't clear and he didn't intend to violate it. In July, Arpaio was found guilty of criminal contempt for refusing to follow a judge's order barring him from the racial profiling of Latinos.He was accused of violating a court order by continuing patrols targeting immigrants. Arpaio has contended the order wasn't clear and he didn't intend to violate it.

The 85-year-old could face up to six months in jail when he is sentenced October 5. His attorneys have said they would appeal the verdict to get a jury trial.

A media-savvy sheriff

During his run as sheriff, Arpaio embraced controversy and media attention.

First elected in 1993, he was infamous for tactics such as cutting salt and pepper from jail meals, giving inmates pink underwear and having female and juvenile chain gangs do manual work.

that critics said was demeaning for inmates as they stayed in scorching heat over 100 degrees and ate calorie-controlled meals. Not long after his election, he opened Tent City, an infamous outdoor jail that critics said was demeaning for inmates as they stayed in scorching heat over 100 degrees and ate calorie-controlled meals.

Arpaio also opened a probe into former President Barack Obama's birth certificate -- a claim that has been thoroughly debunked.

JUST WATCHED 2012: Arpaio won't tolerate government monitoring Replay More Videos ... MUST WATCH 2012: Arpaio won't tolerate government monitoring 01:59

Arpaio was the poster child for hard-line immigration policies until he lost his bid for a seventh term as sheriff in November.

His legal problems had begun much earlier.

In 2007, a group of Latinos filed a class action lawsuit claiming Arpaio's policing policies amounted to racial discrimination. A federal investigation and federal lawsuit followed.

In 2011, a US District Court judge first issued a temporary injunction, barring Arpaio from detaining people solely based on their immigration status after several Hispanics claimed he discriminated against them. Two years later, the same judge issued a permanent order, ruling that Maricopa's handling of people of Latino descent amounted to racial profiling.

Last year, the judge asked federal prosecutors to file criminal contempt charges against Arpaio and several subordinates, alleging they had disregarded the court's directions, made false statements and attempted to obstruct further inquiry.

Before he became sheriff, Arpaio served in the US Army and then was a police officer, a federal narcotics agent and became head of the Drug Enforcement Administration for Arizona, according to his now-removed sheriff's site bio.