PORTLAND, Ore. (AP) — Some journalists and legal observers will be exempt from Portland police orders requiring protesters to disperse after an unlawful assembly or riot is declared, under a 14-day temporary order issued by a federal judge Thursday.

Police also cannot arrest, threaten to arrest or use physical force against a person “who they know or reasonably should know” is a journalist or legal observer. The order says officers are not to seize their cameras, audio or videotaping equipment or press passes unless police have probable cause to believe a crime has been committed.

The request for the restraining order came in a class-action lawsuit filed this week by the American Civil Liberties Union or Oregon against Portland Police and the city on behalf of journalists and legal observers who they say were targeted and attacked by the police while documenting protests.

“We are very pleased that the court granted some relief prior to the long holiday weekend,” said Matthew Borden, partner at BraunHagey & Borden LLP who is serving as co-counsel with the ACLU. “We hope that this creates a needed shield for members of the press and legal observers documenting how police are treating protesters.”

The court order says journalists may be identified by having a press pass, badge, or clothing that identifies them as a member of the press. Legal observers included in the order can be identified by green National Lawyers Guild hats or blue ACLU of Oregon vests.

The suit in Federal District Court in Portland says police have used tear gas, shot rubber bullets and thrown flash bangs at journalists and legal observers in addition to arresting them. The complaint lists six primary plaintiffs—two ACLU observers and four journalists.

The suit seeks damages for those injured by the conduct.

A City of Portland spokesperson has said the city does not comment on pending litigation.