Protesters smashed windows and splashed red paint on the district attorney’s office in Salt Lake City on Thursday after prosecutors cleared police in the fatal shooting of a 22-year-old man, sparking a chaotic confrontation that left one officer injured and two demonstrators under arrest.

Late on Thursday, Utah Gov. Gary R. Herbert (R) declared a state of emergency due to the unrest, restricting access to the state Capitol, while city officials pledged to push for changes to police policy to “dismantle systemic injustice.”

“We accept there will be changes. What we don’t accept is the violence and vandalism we’re seeing tonight,” Salt Lake City Police Chief Mike Brown told KSTU.

Protesters had gathered for weeks at the office of Salt Lake County District Attorney Sim Gill (D) to demand a full investigative report on the death of Bernardo Palacios-Carbajal, who was fatally shot while running away from police on May 23, and charges against the two officers involved.

Gill did release his report on Thursday, but he found that the officers were justified to fire 34 times at Palacios-Carbajal because he had repeatedly dropped and picked up a gun while fleeing police.

The decision was met with outrage from protesters and Palacios-Carbajal’s family.

“I feel angry, sad, disgusted that my brother is gone and they think it’s okay,” Karina Palacios, his sister, said at a news conference. “The way they killed him is not right.”

That anger boiled over at a protest that began around 6 p.m., when about 300 people gathered outside Gill’s office with banners, megaphones and red paint. Chanting, “Justice for Bernardo” and “This is what democracy looks like,” they painted the street red in front of Gill’s office — an action the group also did last month to symbolize the “blood” on Gill’s hands, protest leaders said.

The group then marched around downtown before returning to the district attorney’s office. At some point, protesters also slapped red paint on the district attorney’s sign and painted anti-police graffiti. When protesters bashed out three windows with metal rods, police in riot gear moved in.

A tense standoff began between lines of armored police and protesters, some of whom threw bottles and other debris. A police helicopter circled overhead, demanding over a loudspeaker that protesters disperse and warning at one point, “This is your last opportunity.” Police used shields and batons on the crowd, video shows, until the demonstration broke up.

The Salt Lake City Police Department said that some officers were hit with pepper spray and one officer was taken to the hospital with unspecified injuries.

Police haven’t released details about the two arrests, but a video posted to Facebook by Justice for Bernardo, a group behind the protests, shows protest leader Sofia Alcalá being handcuffed. Asked what she was being charged with, police said “destruction of property.”

Protest leaders said multiple demonstrators were injured by police and blamed officers for the conflict.

“We were peaceful, it was the riot police that literally charged at us and escalated the situation,” Jeanette Vega, an organizer with Justice for Bernardo, told The Washington Post in an email. Vega accused police of firing nonlethal rounds at close range, saying, “Salt Lake City police care more about protecting buildings than human lives.”

Palacios-Carbajal’s case has galvanized protesters in Salt Lake City, particularly after body-cam footage was released showing officers firing dozens of times at him as he ran away. At the time, Salt Lake City Mayor Erin Mendenhall (D) called the footage “genuinely disturbing and upsetting.”

But Gill on Thursday laid out his finding that under state law the officers were justified in the killing. Police were called to a motel around 2 a.m. on May 23 after someone said two men had kicked in a door and robbed them at gunpoint. When police arrived, they found Palacios-Carbajal outside the motel; he ran away when they asked him to hold up his hands, Gill’s report said.

As he ran, he fell at least three times, dropping a gun each time and then picking it back up as officers yelled, “Drop it!” After the third time, Officer Kevin Fortuna fired at him. He fell and rolled onto his back, holding the gun up toward the officers, Gill found, which led Fortuna and Officer Neil Iversen to fire dozens more times.

Gill found they had reason to fear for their safety and said video footage backed up their version of what happened.

Mendenhall said she supported the decision, adding in a statement that “evidence shows that our officers acted according to their training and the state law.”

But the Salt Lake City Council said on Thursday that while state law did appear to clear the officers, they would work to change standards to prevent similar cases in the future.

“We do not accept these systems as they are. We commit to doing our part to improve our City systems while advocating for changes outside our purview at the State or Federal level that will root out racism, dismantle systemic injustice, and lead the State of Utah in promoting equity and justice for all residents,” the statement said.

Palacios-Carbajal’s family, meanwhile, said they plan to sue the police department and pledged to work with protesters to fight for changes to the department’s policies.

“It’s not a correct decision that [Gill] made, and we will continue fighting,” Lucy Carbajal, his mother, said in Spanish, the Salt Lake Tribune reported. “And even though my son isn’t here, he gives us the right to continue fighting so mothers like me do not lose their sons, like they killed my son. That was cowardice.”