ST. LOUIS – A federal judge on Wednesday issued wide-ranging restrictions on the ability of St. Louis police to declare protests "unlawful" and use chemical agents against protesters.

U.S. District Judge Catherine Perry's order says that police can't declare an "unlawful assembly" and enforce it against those "engaged in expressive activity, unless the persons are acting in concert to pose an imminent threat to use force or violence or to violate a criminal law with force or violence."

Police also can't use that unlawful assembly order or threaten the use of chemical agents to punish protesters for exercising their rights, she wrote.

Perry barred the use of pepper spray, mace and other chemical agents against "expressive, non-violent activity" without probable cause to make an arrest and without providing "clear and unambiguous warnings" and an opportunity to heed those warnings.

Police cannot give dispersal orders without giving people specifics about what area they must leave, what chemical will be used, time enough to leave and allowing a way to leave that area, she wrote.

She also immediately ordered both sides to mediation, something Tony Rothert, legal director of the ACLU of Missouri, called unusual at this stage in a case. Rothert said that the ACLU was open to working something out with city officials.

Asked for comment about the ruling, a mayoral spokesman said in an e-mail that the city would "comply with the order."

In a 49-page memorandum accompanying the order, Perry said that based on the evidence presented so far, the ACLU was likely to succeed in its underlying lawsuit over police practices. She faulted police use of mace against nonviolent protesters and those recording police activity, and said police had improperly declared an "unlawful assembly" on some occasions and then gave protesters and others unreasonable and vague dispersal orders.

She said a controversial police "kettle" on Sept. 17 "cannot meet constitutional standards." It was conducted without evidence of "force or violence to officers or property in this mixed commercial and residential area." The scene was "calm," she wrote based on witnesses and videos, with no reported violence for hours before the kettle. Some protesters were "voicing their displeasure with police," but others there were bystanders.

She said some of the ACLU's witnesses "reasonably believed" that any dispersal order didn't apply to them because of its vagueness.

Rothert said kettles carry "too high a chance for error" and under Perry's order, "what happened on Sept. 17 would not be allowed to happen again."