President Donald Trump did not pardon former Maricopa County Sheriff Joe Arpaio while Trump was in Phoenix, but he indicated support for the idea in his speech Tuesday night.

The 85-year-old lawman is scheduled to be sentenced on Oct. 5 for a federal criminal-contempt conviction stemming from a racial-profiling case. Arpaio could face up to six months in jail.

"Was Sheriff Joe convicted for doing his job?" Trump asked the crowd inside the Phoenix Convention Center.

He should have had a jury trial instead of having a verdict rendered by a federal judge, Trump said.

"But I'll make a prediction: I think he's going to be just fine."

Trump's comments suggested a pardon could be granted later.

"I won't do it tonight, because I don't want to cause any controversy. But Sheriff Joe can feel good," he said.

Arpaio told The Arizona Republic he was not surprised by the announcement earlier in the day by a White House spokeswoman that no action would be taken on the issue Tuesday.

MONTINI: Trump SHOULD pardon Arpaio | ROBERTS: Joe Arpaio wonders: Where is Trump when I need him? | ROBB: Let's clarify what happened to Joe Arpaio

In an interview and a tweet last week, Trump whipped up speculation that he would pardon his political ally at Tuesday’s rally. He told Fox News he was “seriously considering” the move, and days later confirmed the Phoenix event on his Twitter account.

Spokeswoman Sarah Huckabee Sanders said otherwise Tuesday afternoon on Air Force One.

"There will be no discussion of that today at any point, and no action will be taken on that front at any point today," Huckabee Sanders told reporters.

Each day after the rally was announced, Arpaio told The Republic that he had yet to receive an invite and had yet to receive word from Trump’s people.

He echoed this sentiment Tuesday afternoon.

“Nothing’s changed, I’m not going,” he said. “I may watch it. I’ll see what happens.”

Asked after the announcement whether he was surprised, Arpaio said, "Not really."

"I don’t think the comments he made eight days ago had any bearing on tonight’s rally," he said, adding that his support of the president was unwavering.

"This is a decision that he or his campaign has made, and I abide by it," he said. "I’ve been with him for two years — almost to the day — I’ve supported him, and I’ll be with him all the way."

Arpaio said he wouldn't comment on why he believed the pardon wouldn't come on Tuesday but implied that the president may be concerned about public safety.

"The main mission today and tonight is to make sure that the people are safe, and the president it safe, and hope that there will be no violent demonstrations and no violence and no laws broken," he said.

Several civil-rights activists and Democrats spoke out Tuesday and in the days leading up to the rally against the possibility of a pardon.

Critics of Arpaio said it would show Trump's disregard of the criminal-justice system and be an official endorsement of racism.

Phoenix Mayor Greg Stanton, who had called for Trump to delay his visit, celebrated the announcement and gave credit to various civil-rights groups.

"Trump backs off Arpaio pardon," he tweeted. "Shows power of @ PuenteAZ @ OneArizona @ LUCHA_AZ @ PromiseArizona @ MiFamiliaVota + others fighting for justice."

Lydia Guzman, a civil-rights activist and longtime foe of Arpaio, said she was glad the president "came to his senses."

"Doing a pardon here, at this event, so close to Charlottesville, would have been horrible for our community," she said. "It could have sparked a riot, and I’m glad he didn’t do it."

Carlos Garcia, director of local immigrant-rights group Puente, said it would have been hypocritcal for Trump to pardon Arpaio at the rally, but in the end the group's activism "was never about the pardon."

"The most important thing is to end the culture and the policies that Sheriff Arpaio cemented," he said.

Trump and Arpaio have enjoyed a cozy relationship since the early days of Trump’s campaign.

The two share a hard-line stance on immigration, and Arpaio was one of the earliest public figures to offer Trump a full-throated endorsement. Arpaio was a regular at Trump’s presidential campaign rallies, introducing him at events in Arizona and speaking on his behalf at the Republican National Convention.

On Nov. 8, hours before Trump’s November victory was confirmed, media outlets announced that Arpaio had lost his seventh run for sheriff. But the lawman’s legal woes continued into his private life, and he faced a criminal-contempt charge stemming from a racial-profiling suit from when he was in office.

After a trial this summer, U.S. District Judge Susan Bolton convicted him of this charge on July 31. She found that Arpaio had willfully defied another federal judge’s order to halt his signature immigration-enforcement practices.

The conviction was first met with silence from the White House, and it was the sheriff himself who reignited the conversation. In a blitz of interviews with local and conservative media earlier this month, Arpaio wondered aloud whether Trump had learned of the conviction, but said he wasn’t going to "ask” Trump for a pardon.

Should one be offered, though, Arpaio told The Republic, he’d gladly accept.

Trump can still issue a pardon at a later date. In the meantime, Arpaio’s attorneys are prepping for an appeal.

Mel McDonald, a former U.S. attorney who once defended Arpaio, said there are certain formalities that are necessary should the pardon happen in the future. He said Trump would likely work with Department of Justice and White House counsel to define the scope of the pardon.

For instance, would he pardon only the guilty verdict or all other allegations of misconduct? A federal judge referred Arpaio for three counts of criminal contempt, but Department of Justice prosecutors only pursued one.

"The case before Judge Bolton is just one piece of the puzzle," he said.

READ MORE:

How Arpaio's supporters, critics reacted to his guilty verdict

'I'm not retired': Joe Arpaio launches conservative non-profit

Sheriff Joe Arpaio has always done it his way

Joe Arpaio no longer 'America's Toughest Sheriff'

The last days of Sheriff Joe Arpaio