PORTLAND, Ore. (KOIN) — A federal judge on Thursday granted a temporary restraining order blocking federal agents in Portland from targeting or arresting journalists and legal observers.

The order, issued in response to a lawsuit filed by the ACLU of Oregon, adds the Department of Homeland Security and U.S. Marshals Service to a restraining order already in place against Portland police.

Under the order, federal agents are barred from dispersing, arresting, threatening to arrest, or targeting force against “any person whom they know or reasonably should know is a Journalists or Legal Observer” at protests “unless the Federal Defendants have probable cause to believe that such individuals have committed a crime.” The order permits journalists and legal observers to stay in an area even after officers have ordered protesters to disperse.

Agents also are prevented from seizing any photo or recording equipment, or press passes. They also can’t order journalists and legal observers to stop recording or watching a protest.

The restraining order lasts for 14 days.