PORTLAND, Ore. (KOIN) — The District Court of Oregon has granted a temporary restraining order limiting the Portland Police Bureau’s use of tear gas during demonstrations.

Federal District Judge Marco Hernandez issued the ruling Tuesday night.

The order restricts Portland police from using tear gas for the next 14 days unless “the lives or safety of the public or the police are at risk. This includes the lives and safety of those housed at the Justice Center. Tear gas shall not be used to disperse crowds where there is no or little risk of injury.”

Portland police have turned to tear gas during recent protests that they said turned violent. Mayor Ted Wheeler said Saturday he strongly believed that “gas should not be used to disperse crowds of non-violent protesters or for general crowd management purposes. It should only be used in response to violence that threatens life safety.”

Two Portland residents and Don’t Shoot Portland, a Black community advocacy nonprofit, filed a class-action lawsuit last week against the City of Portland over the police department’s use of tear gas on protesters.

The plaintiffs also hope to “see a permanent ban on the use of tear gas by Portland police.”