The Trump administration has struck a deal with Oregon to end weeks of clashes between federal officers and protesters in downtown Portland that President Donald Trump has made a focus of his re-election campaign.

But Federal and state officials gave seemingly conflicting accounts of the agreement amid continuing protests in the city over police brutality and racism.

Acting Homeland Security Secretary Chad Wolf told reporters that police agents who were surged to Portland will withdraw from the city when it’s clear that state and local law enforcement can secure downtown streets and prevent property destruction and violence at the federal courthouse, a focal point of protesters’ ire.

Oregon’s Democratic Governor Kate Brown said in a tweet that starting on Thursday, all Customs and Border Protection and officers from Immigration and Customs Enforcement would leave downtown and return home soon after.

The federal law enforcement presence in Portland drew national attention after U.S. agents, some wearing military-style fatigues and driving unmarked vehicles, began patrolling Oregon’s largest city. They have been reportedly whisking away protesters, using aggressive tactics and ultimately sparking even larger counter-protests and opposition from local leaders.

‘Occupying Force’

“These federal officers have acted as an occupying force, refused accountability, and brought violence and strife to our community,” Brown said in a statement.

Wolf told reporters that his agents will remain in Portland “until we are assured that Oregon state police and the plan that the governor has put together is successful.” Federal officers will resume their operations to protect the courthouse if needed, Wolf said.

“We will surge up and we will surge down over time depending on the circumstances,” Wolf said.

Trump has repeatedly called attention to the sometimes violent protests in Portland, blaming Democrats and anarchists as he tried to cast himself as a law-and-order leader. The president tweeted Wednesday that without federal agents’ presence “there would be no Portland” and threatened to send federal forces into the city to do local policing.

Democrat Joe Biden condemned the Homeland Security Department’s presence in Portland, saying the agents had no clearly defined mandate or authority.

Biden’s Remarks

Trump’s decision to send federal agents to Portland and other cities to quell unrest and combat crime has raised questions about whether the move violates the Constitution. It has reignited a national debate on the militarization of policing.

Federal officials had said that use of unmarked vehicles is a standard practice, because demonstrators target patrol cars. Officials said that all officers in Portland wore uniforms that say “police.”

Wolf said he was encouraged that Brown and other state and local officials have offered a plan to end violent confrontations between federal police and protesters at and near the courthouse.

“I’m glad that they are finally seeing the errors of their ways and stepping up and doing what they should have been doing for the past 60 days, and that is partnering with federal law enforcement to do their job,” Wolf said.

Brown said that state police will be downtown to protect free speech and keep the peace.

“Let’s center the Black Lives Matter movement’s demands for racial justice and police accountability,” she tweeted. “It’s time for bold action to reform police practices.”

Many local businesses had sought the departure of the federal agents, led by the Portland Business Alliance, the area’s chamber of commerce.

Stacey Gibson, who co-owns a Subway franchise downtown, a few blocks from the courthouse, said she’s hopeful violence would subside.

“Hopefully it will all calm down,” she said. “Hopefully we’ll see an improvement in the violence.”

--With assistance from Olga Kharif