CHICAGO (AP) — A judge said Thursday she will order federal agents in Chicago to restrict using force against peaceful protesters and media, saying current practices violate their constitutional rights.

The preliminary injunction came in response to a lawsuit alleging federal agents have used excessive force in their immigration crackdown in the Chicago area.

U.S District Judge Sara Ellis 's ruling, which is expected to be appealed by President Donald Trump's administration, refines an earlier temporary order that required agents to wear badges and banned them from using certain riot-control techniques, such as tear gas, against peaceful protesters and journalists. After repeatedly chastising federal officials for not following her previous orders, she added a requirement for body cameras.

Ellis began Thursday’s hearing by describing Chicago as a “vibrant place” and reading from poet Carl Sandburg’s famous poem about the city.

Ellis said it is “simply untrue” that the Chicago area is a violent place of rioters.

“I don’t find defendants’ version of events credible,” Ellis said.

Get our all-good news weekly newsletter
FEEL GOOD FRIDAY

She described protesters and advocates facing tear gas, having guns pointed at them and being thrown to the ground, saying “that would cause a reasonable person to think twice about exercising their fundamental rights.”

The preliminary injunction stems from a lawsuit filed by news outlets and protesters who say agents have used too much force during demonstrations.

It also follows an eight-hour Wednesday hearing with emotional testimony from witnesses who described experiencing tear gas, being shot in the head with pepper balls while praying, and having guns pointed at them when recording agents in residential streets.

Ellis questioned witnesses about how these experiences impacted them and if they prevented them from protesting again. One after another, witnesses described their anxiety about returning to protests or advocacy work.

“I get really nervous because it just feels like I'm not safe,” Leslie Cortez, a youth organizer in the Chicago suburb of Cicero, told Ellis. “And I question my safety when I go out.”

Attorneys also played footage of a five-hour deposition, or private interview, of senior Border Patrol official Greg Bovino, where he defended agents' use of force and dodged questions about Border Patrol tactics in the nations' third-largest city.