A federal judge in Seattle has issued a temporary injunction preventing police in the city from using tear gas or other “chemical irritants” against peaceful protesters.

“The City of Seattle, including the Seattle Police Department and any other officers, departments, agencies, or organizations under the Seattle Police Department’s control … is hereby enjoined from employing chemical irritants or projectiles of any kind against persons peacefully engaging in protests or demonstrations,” U.S. District Judge Richard Jones wrote in his order.

Jones issued the two-week order after a Black Lives Matter group sued the Seattle Police Department this week to halt the violent tactics it has used to break up largely peaceful protests in recent days.

BLACK LIVES MATTER PROTESTERS SAY SEATTLE'S AUTONOMOUS ZONE HAS HIJACKED MESSAGE

The judge said tear gas may be used only if efforts to subdue a threat by using alternative crowd measures, including pepper spray, have been exhausted and ineffective and the chief of police “determined that use of tear gas is the only reasonable alternative available.”

“This order does not preclude individual officers from taking necessary, reasonable, proportional, and targeted action to protect against a specific imminent threat of physical harm to themselves or identifiable others or to respond to specific acts of violence or destruction of property,” Jones wrote.

This week, protesters have turned part of Seattle's Capitol Hill neighborhood into a protest center with speakers, drum circles and Black Lives Matter painted on a street near a police station. Police largely left the station after chaos last weekend, with officers tear-gassing protesters and some demonstrators throwing objects at them. Police used tear gas just a day after the mayor and police chief said they were temporarily halting its use.

SEATTLE OFFICERS FACE 'AUTONOMOUS ZONE' CROWD, SAY 911 RESPONSE TIMES HAVE TRIPLED

Seattle Mayor Jenny Durkan and Police Chief Carmen Best have apologized to peaceful protesters who were subjected to chemical weapons. But Best has said some demonstrators violently targeted police, throwing projectiles and ignoring orders to disperse. Both have faced calls to resign.

The judge said those objecting to police using violent tactics to break up protests make a strong case that the indiscriminate use of force is unconstitutional. Jones said it's especially problematic during the coronavirus pandemic and that weapons like tear gas and pepper spray fail to target "any single agitator or criminal."

"Because they are indiscriminate, they may even spill into bystanders' homes or offices as they have done before," Jones wrote.

The Associated Press contributed to this report.