PORTLAND, ORE. -- A U.S. judge on Friday denied Oregon's request to restrict federal agents' actions when they arrest people during chaotic protests that have roiled Portland and pitted local officials against the Trump administration.

Federal agents deployed by President Donald Trump to tamp down the unrest have arrested dozens during nightly demonstrations against racial injustice that often turn violent. Democratic leaders in Oregon say federal intervention has worsened the two-month crisis, and the state attorney general sued to allege that some people had been whisked off the streets in unmarked vehicles.

U.S. District Judge Michael Mosman said the state lacked standing to sue on behalf of protesters because the lawsuit was a 鈥渉ighly unusual one with a particular set of rules.鈥

Oregon was seeking a restraining order on behalf of its residents not for injuries that had already happened but to prevent injuries by federal officers in the future. That combination makes the standard for granting such a motion very narrow, and the state did not prove it had standing in the case, Mosman wrote.

Legal experts who reviewed the case before the decision warned that he could reject it on those grounds. A lawsuit from a person accusing federal agents of violating their rights to free speech or against unconstitutional search and seizure would have a much higher chance of success, Michael Dorf, a constitutional law professor at Cornell University, said ahead of the ruling.

鈥淭he federal government acted in violation of those individuals' rights and probably acted in violation of the Constitution in the sense of exercising powers that are reserved to the states, but just because the federal government acts in ways that overstep its authority doesn't mean the state has an injury,鈥 he said.

The clashes in Portland have further inflamed the nation's political tensions and triggered a crisis over the limits of federal power as Trump moves to send U.S. officers to other Democratic-led cities to combat crime. It's playing out as Trump pushes a new 鈥渓aw and order鈥 reelection strategy after the coronavirus crashed the economy.

Protesters in Portland have been targeting the federal courthouse, setting fires outside and vandalizing the building that U.S. authorities say they have a duty to protect. Federal agents have used tear gas, less-lethal ammunition that left one person critically injured and other force to scatter protesters.

The lawsuit from Oregon Attorney General Ellen Rosenblum accused federal agents of arresting protesters without probable cause and using excessive force. She sought a temporary restraining order to 鈥渋mmediately stop federal authorities from unlawfully detaining Oregonians.鈥

David Morrell, an attorney for the U.S. government, called the motion 鈥渆xtraordinary鈥 and told the judge in a hearing this week that it was based solely on 鈥渁 few threadbare declarations鈥 from witnesses and a Twitter video. Morrell called the protests 鈥渄angerous and volatile.鈥

Rosenblum said the ramifications of the ruling were 鈥渆xtremely troubling.鈥

鈥淲hile I respect Judge Mosman, I would ask this question: If the state of Oregon does not have standing to prevent this unconstitutional conduct by unidentified federal agents running roughshod over her citizens, who does?鈥 Rosenblum said in a statement. 鈥淚ndividuals mistreated by these federal agents can sue for damages, but they can't get a judge to restrain this unlawful conduct more generally.鈥

Before the federal intervention, Mayor Ted Wheeler and other local leaders had said a small cadre of violent activists were drowning out the message of peaceful protesters. But the Democrat, who was tear-gassed this week as he joined protesters, says the federal presence is exacerbating a tense situation and he's repeatedly told them to leave.

Homeland Security acting Secretary Chad Wolf denied that federal agents were inflaming the situation in Portland and said Wheeler legitimized criminality by joining demonstrators, whom Trump has called 鈥渁narchists and agitators.鈥

In the lawsuit, Oregon had asked the judge to command agents from the U.S. Department of Homeland Security, the Customs and Border Protection, the Federal Protective Service and the U.S. Marshals Service to stop detaining protesters without probable cause, to identify themselves before arresting anyone and to explain why an arrest is taking place.

Agents have arrested 18 people in Portland this week, not including early Friday, when they again used tear gas to force thousands of demonstrators from crowding around the courthouse. Protesters 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.

Wolf said Tuesday that 43 people had been arrested on federal charges at that point.

They face federal charges including assaulting federal officers, arson and damaging federal property, U.S. Attorney Billy J. Williams said. All the defendants are local and were released after making a court appearance.

U.S. officers 鈥渨orking to protect the courthouse have been subjected to nightly threats and assaults from demonstrators while performing their duties,鈥 according to a statement from Williams' office.

The Oregon attorney general'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.

Associated Press writer Andrew Selsky contributed from Salem, Oregon. Cline reported from Salem.