PHOENIX - U.S. President Donald Trump said he is willing to risk a budget crisis in order to honor a campaign pledge to build what he called an “absolutely necessary” wall along the U.S.-Mexico border.

“If we have to close down the government, we are building that wall,” Trump said Tuesday night during a campaign-style rally at the Phoenix Convention Center. He added that in electing him last November, the American people “voted for immigration control.”

Funding for the wall will need to be approved by the U.S. Congress, which has not yet completed work on a budget for the U.S. government for fiscal 2018, which begins Oct. 1. Congressional Democrats oppose the idea of the wall, prompting Trump on Tuesday night to label them as “obstructionist.”

The president also used his rally speech to go on an extended tirade against the media, equating reporters with traitors calling them “bad people who “don’t like our country.”

View full gallery

Trump recited previous statements he made criticizing neo-Nazis, white supremacists and the Ku Klux Klan following the fatal August 12 clash in Charlottesville, Virginia. But he omitted the most controversial words he used to blame the violence "on both sides."

Trump also accused the media of not reporting his comments.

“Did they report I said racism is evil?”

“No!” the crowd loudly replied.

“I’m a person who wants to tell the truth,” Trump declared. “I’m an honest person.”

GOP senators under fire

Arizona’s two Republican U.S. senators, who have both clashed with the president, skipped the event. Trump criticized both John McCain and Jeff Flake without mentioning their names.

Trump’s presence in the Western state, where he beat Democrat Hillary Clinton by 3.5 percentage points in last year’s presidential election, drew tens of thousands of his supporters and protesters to downtown Phoenix, and intense precautions by security forces hoping to prevent violence.

Watch: Themes From President Trump's Phoenix Rally

Protesters taunted those waiting in line to enter the rally with chants of “Shame, shame, shame,” “No hate in our state,” and “No Trump, No KKK, No fascist USA.”

Minutes after Trump finished his campaign-style rally, police fired teargas and percussive (stun) grenades on protesters outside the venue.

“People in the crowd have begun throwing rocks and bottles at police. They also dispersed some gas in the area,” the Phoenix Police Department said in a statement.

?Along the US border

Before the political event in the Arizona capital, the president headed to a Marine Corps base in Yuma, on the border with Mexico and a center of U.S. Border Patrol operations in the area.

The interim director of the U.S. Immigration and Customs Enforcement agency, Tom Homan, told reporters aboard Air Force One as the presidential jet headed to Arizona: “The president’s message is that we need a strong border and we need stronger ... enforcement.”

President Donald Trump is shown methods of narcoti
President Donald Trump is shown methods of narcotics smuggling during a tour of U.S. Customs and Border Protection Border equipment at their airport hanger at Marine Corps Air Station Yuma, Aug. 22, 2017, in Yuma, Arizona.

Trump’s visit to the Border Patrol base included a scheduled inspection of enforcement aircraft, including a drone and a helicopter, and meetings to evaluate the Border Patrol’s operational results, policies and morale “in the lead-up to fiscal year 2018,” another administration official told reporters.

What U.S. teams guarding the border have done since Trump took office seven months ago “has worked,” Homan said. “We need funding to make it permanent. We need to build a wall. A border wall [will be] successful.”

FILE - Former Sheriff Joe Arpaio leaves the federa
FILE - Former Sheriff Joe Arpaio leaves the federal courthouse on July 6, 2017, in Phoenix, Arizona.

Pardon for Arpaio?

Ahead of Trump’s arrival, there was speculation he might announce a pardon for Joe Arpaio, the former sheriff of Maricopa County, Arizona, and renowned hardliner on immigration policies. But that was not to be.

“There will be no discussion of that today at any point, and no action will be taken on that front at any point today,” Press Secretary Sarah Huckabee Sander told reporters aboard Air Force One.

Trump did however give the strongest indication he may, at some time, pardon the 85-year-old Arpaio, who was recently convicted of contempt of court for ignoring a judicial order to halt his immigration patrols.

“Do the people in this room like Sheriff Joe Arpaio? So was Sheriff Joe convicted for doing his job? He should have had a jury, but you know what, I’ll make a prediction, I think he’ll be just fine, OK? But I won’t do it tonight, because I don’t want to cause any controversy, is that OK? But Sheriff Joe can feel good.”

FILE - Protesters march through downtown Phoenix,
FILE - Protesters march through downtown Phoenix, May 1, 2017. Immigrant and union groups marched in cities across the United States on Monday to mark May Day and protest against President Donald Trump's efforts to boost deportations.

Mayor’s request rejected

The president rejected Phoenix Mayor Greg Stanton’s request to postpone or cancel Tuesday’s rally. The Democratic official had expressed concern about Trump’s recent comments about violent demonstrations in Virginia.

The mayor said Trump’s statements doused racial tension with gasoline, and he expressed concern that “the president may be looking to light a match” in Arizona.

Supporters of the president began lining up outside the convention center 18 hours before Trump’s address, some coming from other states.

Watch: In Phoenix, Trump Protesters and Supporters Turn Out

?Medics stand by

Outdoor temperatures peaked above 40 degrees Celsius (104 Fahrenheit) Tuesday. Volunteer medics treated several suffering from heat exhaustion or dehydration, and stood by to render first aid in case violence erupted.

Members of a motorcyclists’ group known as Bikers for Trump planned to ride to the convention center to protect the president’s supporters from harassment.

Several local protest groups formed by members of Phoenix’s Hispanic, Jewish and Native American communities were joined by some out-of-town protesters.

Other demonstrators wore purple to honor Heather Heyer, the young woman who was killed in Charlottesville, Virginia, 10 days ago, when a man affiliated with white-supremacist groups drove his car into a crowd on the day after a protest march by torch-bearing demonstrators resulted in clashes with other protesters.

Tuesday’s event in Arizona was Trump’s eighth rally in eight months for his 2020 re-election campaign.

The state’s largest circulation newspaper, even before the president had finished his speech, tweeted that in its view: “If he came to deliver a message of unity, he failed.”

News anchor Don Lemon on CNN, which Trump repeatedly attacked during his remarks called the speech a “total eclipse of the facts.”