Updated

A federal judge on Friday denied an order sought by Oregon's attorney general to prohibit federal agents from making arrests during the ongoing protests in Portland amid a battle between progressive local leaders and the Trump administration over the presence of federal forces.

U.S. District Court Judge Michael Mosman said the state lacked standing to sue on behalf of protesters.

Oregon Attorney General Ellen Rosenblum sued the Trump administration last week, alleging federal agents have arrested protesters without probable cause and used excessive force. Authorities deny the accusations.

DHS CHIEF SLAMS PELOSI FOR CALLING FEDERAL LAW ENFORCEMENT 'STORMTROOPERS'

Federal officers use crowd control munitions to disperse Black Lives Matter protesters outside the Mark O. Hatfield United States Courthouse on Tuesday in Portland, Ore. On Thursday, a federal judge denied an order to prevent federal agents from arresting people during nightly protests in Portland. (AP Photo/Noah Berger)

The lawsuit sought a restraining order to stop federal authorities from unlawfully detaining protesters. Agents have arrested 18 people in Portland this week, the Justice Department said Friday. They face a slew of charges, including assaulting federal officers, arson, looting and damaging federal property.

The agents have been "subjected to nightly threats and assaults from demonstrators while performing their duties," said U.S. Attorney Billy J. Williams.

Federal agents were sent to the city by President Trump, who has blamed local officials for not addressing the nightly gatherings while trying to project himself as a law and order president. The most recent civil unrest has occurred near the Mark O. Hatfield U.S. Courthouse where fires have been set and some protesters have hurled projectiles at agents.

Protesters also projected lasers on the building and tried to take down a security fence. They scattered as clouds of gas rose up and agents fired crowd control munitions, which critically injured a demonstrator this month.

However, the use of tear gas and rubber bullets have set off a wave of criticism from Democratic mayors and civil liberties advocates across the country who are opposed to the deployment of federal agents to cities.

“While the decision in the state’s lawsuit is disappointing, federal agents should not for a minute think their unconstitutional actions will go unanswered," said Jann Carson, interim executive director of the ACLU of Oregon. "The ACLU will be in court again to hold federal agents accountable for their unconstitutional attacks on the right to protest.”

A Black Lives Matter protester burns an American flag outside the Mark O. Hatfield United States Courthouse on Monday in Portland, Ore. (AP Photo/Noah Berger)

CLICK HERE TO GET THE FOX NEWS APP

Rosenblum's motion was one of several lawsuits against authorities’ actions. A different federal judge late Thursday blocked U.S. agents from arresting or using physical force against journalists and legal observers at demonstrations.

"None of the government’s proffered interests outweigh the public’s interest in accurate and timely information about how law enforcement is treating" protesters, U.S. Judge Michael Simon wrote.

The Associated Press contributed to this report.