This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A judge in Portland, Oregon, barred federal law enforcement officers from arresting or using physical force against journalists and legal observers mixed in with the crowds at nightly protests near a complex of government buildings there if they’re not suspected of committing crimes.

Federal Judge Michael H. Simon issued the temporary restraining order Thursday evening ahead of another night of expected protests in the city’s downtown. Videos taken by news crews there have captured harrowing moments — like when the city’s mayor was overcome by tear gas deployed to disperse a crowd on Wednesday — and the American Civil Liberties Union had filed suit against the Department of Homeland Security and the US Marshals Service, which command the officers, detailing several examples of identified journalists allegedly being abused by the authorities.

The order, which Simon opened with a series of quotes about the importance of the free press, also says journalists can ignore dispersal orders issued by authorities.

The order could present federal law enforcement with new challenges as it continues to carry out its mission of protecting federal property. For the past two months, protesters have regularly torn down fencing and attempted to break into the Mark O. Hatfield Courthouse — where Simon’s chambers are located — in a confrontation that has been seized on by President Donald Trump and spun into a political hot-button issue featured in his reelection messaging.

More than 40 people have been arrested by the federal officers, and at least 26 charged federally, including one man accused of hitting an officer with a sledgehammer and others who allegedly pointed lasers at officers’ eyes, leaving some with potentially permanent vision damage.

In court filings, the Justice Department had called an order blocking the federal officers’ targeting of the groups “unworkable in light of the split-second judgments that federal law enforcement officers have to make while protecting federal property and themselves during dynamic, chaotic situations.”

The order would also be “unworkable from a practical standpoint,” prosecutors wrote, because “it would require law enforcement officers responding to a violent situation threating (sic) public safety to draw fine distinctions among a crowd based on who is wearing press identification badges and different colored hats, all under the threat of potential contempt.”

The ACLU had called that argument unsubstantiated, however, and noted that Simon had issued a parallel order three weeks ago that has blocked the heavy-handed enforcement against the groups by local police officers in the city.

“This order is a victory for the rule of law,” said Jann Carson, interim executive director of the ACLU of Oregon. “Federal agents from Trump’s Departments of Homeland Security and Justice are terrorizing the community, threatening lives and relentlessly attacking journalists and legal observers documenting protests. These are the actions of a tyrant, and they have no place anywhere in America.”