Federal forces deployed in the US city of Portland, rocked by weeks of clashes between demonstrators and law enforcement, will start pulling out of the city on Thursday, the state governor announced.

Acting Homeland Security Secretary Chad Wolf indicated, meanwhile, that an agreement had been reached for federal forces in downtown Portland to give way to local law enforcement -- but warned a full pullout depended on the security situation "significantly" improving.

President Donald Trump's administration sent armed officers, many wearing combat-like gear, to intervene in Portland after weeks of anti-racism and anti-police protests left a federal courthouse and other buildings marred with graffiti and broken windows.

But the protests have only intensified since federal officers arrived, with Democrats assailing the deployment as a ploy to boost Trump's law-and-order credentials as he seeks reelection.

"After my discussions with (Vice President Mike) Pence and others, the federal government has agreed to withdraw federal officers from Portland," Oregon governor Kate Brown tweeted Wednesday.

"They have acted as an occupying force & brought violence. Starting tomorrow, all Customs and Border Protection & ICE officers will leave downtown Portland."

In his statement, Wolf said he and Brown had "agreed to a joint plan to end the violent activity in Portland directed at federal properties and law enforcement officers."

Federal officers pictured in Portland, Oregon on July 25, 2020 -- the city has been rocked by weeks of clashes between demonstrators and law enforcement
Federal officers pictured in Portland, Oregon on July 25, 2020 -- the city has been rocked by weeks of clashes between demonstrators and law enforcement AFP / Ankur Dholakia

"That plan includes a robust presence of Oregon State Police in downtown Portland," he said, adding that "state and local law enforcement will begin securing properties and streets, especially those surrounding federal properties, that have been under nightly attack."

Wolf set no timeline for a pullout, stressing that the "current, augmented federal law enforcement personnel in Portland" would remain until assured that federal properties "will no longer be attacked" in the city.

"Should circumstances on the ground significantly improve due to the influx of state and local law enforcement, we anticipate the ability to change our force posture."

Attorney General Bill Barr was grilled by US lawmakers Tuesday over the Portland operation, strongly denying any attempt to stifle peaceful protests, or that the deployment aimed to boost Trump's reelection prospects.

In parallel with the contested crackdown in Portland, the administration has sent in federal agents to supplement local law enforcement in several US cities facing a rise in gun crime: Chicago, Kansas City and Albuquerque -- compounding public anger over the situation in Portland.

Wednesday's announcement on Portland came as Trump's administration said it was expanding the controversial "surge" of federal agents to three more US cities -- Cleveland, Detroit and Milwaukee.

In a statement, Barr said all three Democratic-run cities "have seen disturbing increases in violent crime, particularly homicides."

As part of so-called "Operation Legend," just under 100 agents will head to the three Great Lakes cities, according to the Justice Department, which said homicides were up 13 percent in Cleveland, 31 percent in Detroit and 85percent in Milwaukee since the start of the year.