Phoenix Mayor Greg Stanton, a Democrat, criticized President Trump on Wednesday for his campaign-style rally there, saying the president "did nothing to unite this country" through his rhetoric and hints he might pardon for Maricopa County Sheriff Joe Arpaio.

"His words tended to divide the country, not unite the country. So to do a campaign rally here in Phoenix in which he openly talked about pardoning Sheriff Joe, and all that Sheriff Joe has done to terrorize Latino residents here locally, you put it all together, it just wasn't the right time for a speech like that," Stanton told MSNBC. "Unfortunately, last night, the president gave a speech that did continue to divide this country. He did nothing to unite this country and did indicate he will be pardoning Sheriff Joe."

Trump gave a wandering speech to supporters in Phoenix over the objections of Stanton, who asked the president to cancel his event.

In an op-ed in the Washington Post published Tuesday, Stanton said he feared Trump "may be looking to light a match."

But the president moved forward with his speech, which lasted longer than an hour and included criticisms of the media and Arizona's two Republican senators, John McCain and Jeff Flake. Trump also indicated he would be pardoning Arpaio, though White House press secretary Sarah Sanders told reporters earlier in the day Trump wouldn't be issuing a pardon "today."

Arpaio was found guilty of criminal contempt of court in July for defying a court order to stop traffic patrols that targeted immigrants.

During his interview with MSNBC, Stanton said Trump "failed to show real moral leadership" after the violence in Charlottesville, but could have used his speech in Phoenix to unite the country.

"There was still an opportunity to come here to Phoenix and look the people of Phoenix in the eye and look the people of the country in the eye, and instead of talking politics or attack on the media and making it a campaign-style rally, instead what he should have done is said, ‘this is a time for the country to come together. Let's be united.'"

Instead, Stanton said the speech was "very unfortunate."

"I think he failed to do that again last night in Phoenix," Stanton said.