A federal judge has ordered police in the St. Louis area to give protesters prior warning and enough time to disperse before using tear gas. The temporary order comes after three people testified in front of the judge, complaining about the use of excessive force by police to control recent demonstrations against the death of Michael Brown in Ferguson, Missouri.

Judge Carol Jackson ruled that police should allow a “reasonable” amount of time for protesters to disperse before resorting to the use of tear gas. However, Jackson did not clarify what could be considered as a reasonable period of time and said that deciding that would be up to the police, the St. Louis Post-Dispatch, a local newspaper, reported. She also reportedly rejected a request for an order that would make the use of tear gas a “last resort,” stating that there was no proper way to judge it.

“There was no distinction drawn in the way peaceful protesters were treated and the way criminals were treated, even though the police do make those distinctions in other situations,” Jackson said, according to the Post-Dispatch.

The lawsuit naming the heads of St. Louis Metropolitan Police Department, St. Louis County Police Department and Missouri State Highway Patrol, was filed earlier this week, following a series of violent protests and clashes with law enforcement, after Officer Darren Wilson, who was accused of shooting Brown on Aug. 9, was not indicted by a grand jury.

Officials testified in Thursday's hearing that they had to do whatever was necessary to control an unruly crowd. Lt. Steven Dodge, the city SWAT commander, reportedly said that police had to act quickly, particularly on occasions when shots were fired from within crowds or businesses were looted. Dodge added that he believed that tear gas helped save lives and property

“By virtue of using the tear gas, you’re not trying to disperse a crowd, because there hasn’t been a lawful order to disperse a crowd,” Thomas Harvey, one of the lead lawyers for the protesters and co-founder of Arch City Defenders, a local group that handles cases for the poor and vulnerable, said, according to MSNBC, adding: “So you’re punishing people and the effect of that punishment is to chill their First Amendment rights. So, who comes out to a protest if what they believe is going to happen when they’re out there standing on the streets complying with the police officer’s orders is they’re going to be tear-gassed.”