PORTLAND, Ore. — The Oregon attorney general filed a lawsuit late Friday night alleging that the federal government had violated Oregonians’ civil rights by seizing and detaining them without probable cause during protests against police brutality in the past week.

The legal action comes after days of intensifying clashes between the Trump administration and Portland officials, who have accused federal agencies of heavy-handed tactics that inflame unrest and threaten citizens.

Department of Homeland Security agents have swarmed the city in recent days, arguing that they are needed to restore order after nearly two months of demonstrations. But local officials, including Oregon Gov. Kate Brown (D) and Portland Mayor Ted Wheeler (D), have implored the agency to step down, with the mayor calling the police force President Trump’s “personal army” and suggesting its tactics are only making things worse.

The federal government is “overstepping their powers and injuring or threatening peaceful protesters on the streets of Downtown Portland,” according to a release from the Oregon Department of Justice Friday.

As Portland entered its 50th night of protests on July 16, here's a look back at how tensions between protesters and police have risen. (The Washington Post)

Oregon Attorney General Ellen Rosenblum filed a lawsuit that accused several agencies of unlawful law enforcement, including the Department of Homeland Security, Customs and Border Protection, the U.S. Marshals Service and the Federal Protection Service.

“John Does 1-10” are also named as defendants because “they have made it impossible for them to be individually identified by carrying out law enforcement actions without wearing any identifying information, even so much as the agency that employs them,” the complaint says.

Rosenblum said her department was also seeking a temporary restraining order to prevent federal authorities from unlawfully detaining Oregon residents. That comes after Mark Pettibone, 29, was detained by several men in green military fatigues and generic “police” patches on their clothing as he walked home from a protest early Wednesday morning.

Pettibone said the men, later identified as CBP officers, searched him and then took him in an unmarked minivan to a federal courthouse, where he was held for several hours. Pettibone told The Washington Post that the federal agents did not tell him why he had been picked up or provide a record of his arrest.

Portland protester Conner O'Shea described what he says were federal agents scouring the streets and making arrests in unmarked vans on July 15. (The Washington Post)

One protester, Conner O’Shea, said he was standing on a street corner with Pettibone when he saw an unmarked vehicle pull up next to him. Men wearing fatigues and helmets jumped out of a van and started running toward O’Shea and other protesters, who quickly dispersed.

O’Shea said the men didn’t announce who they were. He ran several blocks before diving behind a barricade where he hid until a friend drove to pick him up.

“My brain was firing on every cylinder, ‘We’re getting taken by the government,’ ” he said. “I have never been more terrified in my life. I could not and am still not thinking straight.”

CBP’s tactics came under intense scrutiny after a video circulating online showed two men in apparent military garb take a young man wearing all black into custody in Portland in the past week. In a statement, CBP said that its agents were wearing gear that identified them as agency personnel and that they detained the man because they suspected he was involved in “assaults against federal agents or destruction of federal property.”

Rosenblum highlighted another incident as motivating the department’s actions. On July 12, a peaceful protester was hit in the head with an “impact weapon” and suffered severe injuries. The Oregon Department of Justice Criminal Justice Division has also opened an investigation into that incident.

The American Civil Liberties Union Foundation of Oregon has also filed suit against DHS and the U.S. Marshals Service. The lawsuit seeks to block federal law enforcement from dispersing, arresting, threatening to arrest, or using physical force against journalists or legal observers, the organization said.

On Saturday, House Speaker Nancy Pelosi (D-Calif.) and Rep. Earl Blumenauer (D-Ore.) issued a joint statement drawing on the Portland protests, the crackdown in June by the White House on peaceful gatherings in the District and the death of fellow congressman and civil rights leader John Lewis.

“We are again reminded of the immense power of peaceful protest in the fight against racial injustice and police brutality,” the statement read. “Yet time and time again, the Trump Administration shows its lack of respect for the dignity and First Amendment rights of all Americans … We will not tolerate the use of Oregonians, Washingtonians — or any other Americans — as props in President Trump’s political games.”

Several different protests took place throughout Portland early Saturday evening, Pacific time, with demonstrators showing no signs of losing energy or fervor on their 51st straight day of protesting police brutality.

One protest drew a crowd of more than 200 people, a majority clad in all black, to a park in the northeast part of the city. Attendees applauded speakers and chanted “black lives matter” and “all night all day, we’re going to make the piggies pay.”

Another gathering of about 100 people included speakers advocating for a smaller police force and police accountability.

At a protest organized by a group called Doctors for Justice, about 100 people gathered outside the Multnomah County Justice Center. Speakers admonished police violence in front of a cloth backdrop that read, “stop assaulting our patients.”

By 9 p.m., the size of the downtown protest had grown significantly, with demonstrators spilling down several streets. A line of women who called themselves the “wall of moms” linked arms and blocked the road between the federal courthouse and the protesters. They chanted, “feds stay clear, the moms are here” and “leave our kids alone.”

By 10 p.m., protesters had begun to dismantle a new heavy duty fence surrounding the federal courthouse. They stacked pieces of the fence against several entryways, pounded on the building’s graffitied walls and pointed green lasers at windows.

Federal police responded with CS gas and flash bangs, dispersing the crowd. Protesters responded to police use of gas by shooting fireworks at the federal building.

Video captured at the scene of Saturday’s demonstration showed police using a baton and pepper spray against protesters. At another large protest across town, protesters reportedly broke into the police union building and started a fire, which was quickly extinguished. Police declared that protest a riot.

In previous evenings of protests, groups have converged upon police precincts and union buildings, where late-night clashes with officers have occurred.

The legal actions come after nearly two months of unrest. In the weeks after George Floyd’s death in police custody, protests swelled nationwide over police violence and racism in U.S. society. But in Portland, the demonstrations have been sustained for 51 days.

Clashes between the federal government and local authorities continued to escalate in the past week. On Friday night, some protesters lobbed water bottles, smoke bombs and fireworks at courthouse and police buildings.

In response, federal agents used tear gas, rubber bullets and flash bangs to disperse a crowd, and several people were arrested. Videos and witness accounts described unidentified officials in unmarked vans and detaining protesters.

Mayor Wheeler said the federal agents were Trump’s “personal army” and called on them to leave Portland.

“This is part of a coordinated strategy of Trump’s White House to use federal troops to bolster his sagging polling data,” Wheeler said. “As we were starting to see things de-escalate, their actions last Saturday night and every night since have actually ratcheted up the tension on our streets.”

In an interview with NPR Friday, Ken Cuccinelli, acting deputy secretary of homeland security, defended his agency’s tactics in Portland and suggested his agents might deploy similar approaches in other cities.

“With as much lawbreaking is going on, we’re seeking to prosecute as many people as are breaking the law as it relates to federal jurisdiction,” he said. “That’s not always happening with respect to local jurisdiction and local offenses. But, you know, this is a posture we intend to continue not just in Portland but in any of the facilities that we’re responsible for around the country.”

Devlin Barrett, Katie Shepherd, Mark Berman and Maria Sacchetti contributed to this report.