Portland Mayor Ted Wheeler Thursday evening condemned the actions of rioters who attempted to set fire to a police precinct and blocked the exits while officers were inside.

“When you commit arson with an accelerant in an attempt to burn down a building that is occupied by people who you have intentionally trapped inside, you are not demonstrating, you are attempting to commit murder," Wheeler said in a news conference with Portland Police Chief Chuck Lovell.

"Don’t think for a moment that you are if you are participating in this activity, you are not being a prop for the reelection campaign of Donald Trump — because you absolutely are," he said. "You are creating the B-roll film that will be used in ads nationally to help Donald Trump during this campaign. If you don’t want to be part of that, then don’t show up.”

A riot was declared Wednesday evening when agitators descended upon the Portland Police Bureau’s East Precinct building, spray-painted over security cameras, broke a glass door with a 2x4, lit a fire using an accelerant and threw fireworks and other objects at officers, according to FOX 12 in Portland.

Police said that a truck also attempted to run over officers.

RIOTERS VANDALIZE, SET FIRE AT PORTLAND POLICE ASSOCIATION OFFICE: POLICE

The front doors of the precinct were barricaded before the fire was started with more than 20 officers and civilian employees inside, police said, according to FOX 12.

Officers used tear gas to disperse the rioters and at least eight people were arrested. A federal court order bars police from using tear gas unless a riot is declared.

“I believe that city staff could have died last night,” Wheeler said. “I cannot and I will not tolerate that. This is not peaceful protests. This is not advocacy to advance reforms.”

Rioters also vandalized and broke into Portland’s Police Association Tuesday night.

Wheeler also urged peaceful protesters to avoid gatherings that could turn destructive or violent, according to Oregon Live.

“If you are a nonviolent demonstrator and you don’t want to be part of intentional violence, please stay away from these areas,” Wheeler said. “Our community must say that this violence is not Portland, that these actions do not reflect our values and these crimes are distracting from reform, not advancing.”

PORTLAND POLICE CHIEF SAYS RIOTS NOT HELPING CAUSE OF RACIAL JUSTICE: 'ENOUGH IS ENOUGH' 

The clashes between thousands of protesters and federal agents sent by the Trump administration to guard the federal courthouse stopped after an agreement between Democratic Gov. Kate Brown and the U.S. Department of Homeland Security that called for the agents to begin drawing down their presence in Portland’s downtown on July 30.

Some instigators have moved on to other police buildings across the city to cause problems.

Wednesday night’s violence in a residential neighborhood on the east side of the city began after a group of about 100 people gathered in a nearby park for a rally advertised on social media by the group Pacific Northwest Youth Liberation Front with the slogan “No cops. No prisons. Total abolition." The group then marched to the precinct.

At the same time, a larger peaceful group of Black Lives Matter protesters gathered downtown to give speeches. No police presence was necessary, Portland Police Bureau Capt. Tony Passadore said.

“Hurting people and trying to trap people in a building and burn them up, it’s just completely awful,” Portland Fire & Rescue Lt. Damon Simmons reiterated in the news conference, according to FOX 12.

Wheeler said the city anticipates “additional planned attacks on public buildings” in the coming days and said he was giving the police leeway to do what they needed to do to counter those plans as long as it can be done without threatening peaceful protesters.

On Wednesday, Portland Police Chief Chuck Lovell said rioters aren’t forwarding the cause of racial injustice protesters. "Portlanders need to send a strong message that enough is enough," he said. “This movement is really powerful, but the violence has taken away from it.”

Wheeler was met with jeers from protesters two weeks ago when he joined them for a dialogue.

CLICK HERE TO GET THE FOX NEWS APP

Portland has faced nearly 70 nights of anti-police protests since the police custody death of George Floyd.

The Associated Press contributed to this report.