The attorney general for the US state of Oregon has filed a lawsuit against the federal government, accusing it of unlawfully detaining protesters.
There have been nightly protests against police brutality in Portland since the killing of George Floyd.
This week, federal officers in unmarked vehicles appeared to forcefully seize protesters from the streets and detain them without justification.
The federal government has said it is trying to restore order in the city.
Federal agents, deployed by President Donald Trump, have also fired tear gas and less-lethal munitions into crowds of demonstrators. Homeland Security Secretary Chad Wolf previously called the protesters a "violent mob".
Late on Saturday, protesters were seen dismantling a fence around the federal courthouse, hours after it was put up. The US Attorney's office in Oregon said on Twitter that the fence aimed to "de-escalate tensions between protesters and law enforcement officials and asked people to leave it alone.
Officers declared a riot outside the Portland Police Association building in the north of the city. It was set on fire but the blaze has now been put out, police said.
What does the lawsuit say?
In the lawsuit, Oregon Attorney General Ellen Rosenblum requested a restraining order to stop agents from the Department of Homeland Security, US Marshals Service, US Customs and Border Protection and the Federal Protection Service from making any more arrests in the city.
"These tactics must stop," Ms Rosenblum said in a statement. "They not only make it impossible for people to assert their First Amendment rights to protest peacefully, they also create a more volatile situation on our streets."
Their methods, she added, are "entirely unnecessary and out of character with the Oregon way".
"The federal administration has chosen Portland to use their scare tactics to stop our residents from protesting police brutality and from supporting the Black Lives Matter movement," she said. "Every American should be repulsed when they see this happening. If this can happen here in Portland, it can happen anywhere."
The lawsuit itself claims that these tactics prevent citizens, who are "reasonably afraid of being picked up and shoved into unmarked vans - possibly by federal officers, possibly by individuals opposed to the protests" from being able to exercise their constitutional First Amendment right to assembly.
It also accuses federal officers of violating the Fourth and Fifth Amendment by seizing and detaining people without a warrant, and denying them due process.
Earlier this week, Oregon Governor Kate Brown also accused federal agents of "blatant abuse of power".
What happened?
A report from Oregon Public Broadcasting (OPB) earlier this week contained detailed accounts of witnesses who had seen federal law enforcement officers dressed in camouflage emerge from unmarked vehicles, grab protesters without explanation, and drive off.
The last week has seen a violent escalation between protesters and federal agents, deployed two weeks ago by Mr Trump to quell civil unrest.
Since at least 14 July, OPB reports, federal agents have been jumping out of unmarked vehicles throughout the city, and grabbing protesters seemingly without cause.
Video checked by the broadcaster shows a protester, Mark Pettibone, describe how on 15 July he was "basically tossed" into a van containing armed people in body armour.
Mr Pettibone said he was taken to a holding cell in a federal courthouse, where he was read his arrest rights. After he declined to answer questions, he was released without any citation or arrest record.
According to OPB, federal officers have charged at least 13 people with crimes related to the protests so far.
Some have been detained around the federal courthouse that the agents were sent to protect, but others were seized streets away from federal property, reported the Associated Press.
What has the Trump administration said?
Arriving in the city on Thursday to meet federal law enforcement, the acting secretary of homeland security defended the agents against the assembled "anarchists".
In a nearly 1,700-word statement, Mr Wolf blamed state and city authorities for failing to "restore order". He said their response had "emboldened the violent mob as it escalates violence day after day".
"The city of Portland has been under siege for 47 straight days," he wrote.
"Each night the violent anarchists destroy and desecrate property, including the federal courthouse, and attack the brave law enforcement officers protecting it."
Mr. Wolf's comments echo those of Mr. Trump. This week, the president applauded the efforts of federal agents in Portland, saying officers had done a "great job".
"Portland was totally out of control, and they went in, and I guess we have many people right now in jail," he said at a press conference on Monday. "We very much quelled it, and if it starts again, we'll quell it again very easily."