Sacramento police appeared to struggle to get cooperation from bystanders Wednesday evening while cordoning off the scene of a shootout that led to the death of one of their own.

A video posted to Twitter by Matthew Keys, a digital editor at Comstock's Magazine, appears to capture neighborhood residents shouting back at officers as they try to secure the area.

At one point, as an officer tries to move residents back, away from the crime scene, a woman off camera can be heard saying: “When this thing is reestablished we’ll move. We gonna watch, though.”

NEW JERSEY MOM ALLEGEDLY BITES COPS 3 TIMES, PUNCHES ANOTHER WHILE DROPPING KIDS AT SCHOOL

“You all are looking for one person?,” someone is heard asking the police.

“The only person we need to be safe from is you,” another woman off camera is heard shouting.

“Hey, stray bullets catch people, man,” the officer responds.

Another voice behind the camera berates a cop for wearing a gun, repeatedly calling him a “coward.”

“Take that gun off. I’ll whoop your little butt,” the woman says. “All y’all cowards.”

“We know they are,” says the first one. 

“Y’all cowards. We got guns too,” another voice says.

CLICK HERE TO GET THE FOX NEWS APP

A female Sacramento officer died late Wednesday, hours after someone with a rifle opened fire on her and other officers while responding to a domestic violence call. Authorities had evacuated residents in the area and were engaged in an hours-long standoff with the suspect who had barricaded himself inside a home.

The Associated Press contributed to this report.