In the first formal blow to the policing tactics being used in Ferguson, Mo., a federal judge ruled Monday that the “5 second rule” — a policy being enforced by some officers that required protesters to be moving at all times during demonstrations or be subject to arrest — was unconstitutional and violated the protesters’ First Amendment rights.

“The practice of requiring peaceful demonstrators and others to walk, rather than stand still, violates the constitution,” U.S. District Court Judge Catherine Perry wrote in the ruling — which clarifies that police are still free to use any number of other tactics to manage the crowds that have gathered to protest each night since the Aug. 9 shooting of Michael Brown.  “This injunction prevents only the enforcement of an ad hoc rule developed for the Ferguson protests that directed police officers, if they felt like it, to order peaceful, law-abiding protesters to keep moving rather than standing still.”

From the early days of the protests — which have fluctuated from dozens to hundreds on some night, primarily to call for the arrest of Darren Wilson, the officer who shot and killed Brown — police have used varying tactics to manage the crowds. In mid-August, some officers began instructing demonstrators of a new, so-called “five-second rule,” under which protesters were instructed that they must remain moving at all times and that they could not remain still for more than five seconds. Legal observers sent by national organizations quickly decried the rule, and protest leaders insisted that it was an attempt to undermine their right to demonstrate.

“Vague rules that are applied in a haphazard fashion tend to increase community tension,” said Tony Rothert, legal director of the ACLU of Missouri. “Judge Perry’s injunction is a huge win for peaceful protesters and those who believe in the rule of law.”

The ruling, which comes after the ACLU formally challenged the policy on constitutional grounds, comes as top law enforcement officials continue to insist that they never formally instructed officers to carry out such a policy.

Missouri Highway Patrol Capt. Ron Johnson, who was in charge of leading the policing efforts for several weeks during the protests, said that he had not heard of the rule until the lawsuit was filed. St. Louis County Police Chief Jon Belmar, who has formally taken over jurisdiction of policing the protests, told The Post in an interview Monday afternoon that his officers would not be enforcing any such policy.

“I never heard of such a rule, that wasn’t anything that we had put into policy, practice or procedure,” Belmar said. “We’re not going to do a five-second rule.”

However, Post reporters on the ground in Ferguson witnessed officers on several nights instructing protesters that they must continue to walk up and down the street or else they would be placed under arrest.

“Citizens who wish to gather in the wake of Michael Brown’s tragic death have a constitutional right to do so,” Perry wrote later in the ruling. “But they do not have the right to endanger the lives of police officers or other citizens. The police must be able to perform their jobs, and nothing in this order restricts their ability to do that.”