US federal officers will stay in the protest-wracked city of Portland until local law enforcement officials finish a "cleanup of anarchists and agitators," President Donald Trump said.

The forces -- whose deployment was seen by many as part of the president's law-and-order strategy for re-election and exacerbated tensions between authorities and anti-racism protestors -- had been scheduled to begin their phased pullout from Portland on Thursday.

Trump tweeted late Friday: "Homeland Security is not leaving Portland until local police complete cleanup of Anarchists and Agitators!"

Hundreds of demonstrators -- some with makeshift shields -- were still on the streets of downtown Portland late Friday, without any federal law enforcement in sight.

One protestor, who gave only her first name Rudi, asked: "What does clean up mean?"

"There's nothing happening that needs cleanup... no rioting, no looting. Trump is just speaking to riot his base," the 39-year-old told AFP.

An AFP reporter said despite people remaining on the streets the scene remained calm, with no visible presence of federal agents.

Earlier, Portland police cleared parks and nearby roads around the city center on Friday in anticipation of the phased pullout by federal forces.

City mayor Ted Wheeler said the deployment was part of the agreement for federal officers to leave.

In a tweet late Friday, Wheeler thanked the peaceful protestors, and said they had "reclaimed the space that has been a staging ground for violence, to share their powerful message of reformative justice."

Portland, in the state of Oregon, has been rocked by anti-racism demonstrations
Portland, in the state of Oregon, has been rocked by anti-racism demonstrations GETTY IMAGES NORTH AMERICA / Scott Heins

Earlier this month the Trump administration sent federal tactical teams, many wearing combat-like gear, to intervene in the city after weeks of protests against racism and police brutality saw windows broken and graffiti scrawled on the federal courthouse and other buildings.

But their deployment inflamed the situation, especially following footage of protesters being snatched off the street by federal agents and put into unmarked cars.

Democrats said the intervention reeked of a "police state" and that it was a political move to show Trump -- who is struggling in the polls ahead of November's presidential election -- to voters as a strict law-and-order president.

Attorney General Bill Barr has defended the use of federal officers, and rejected any suggestion of the political motivation.

"In the wake of George Floyd's death, violent rioters and anarchists have hijacked legitimate protests to wreak senseless havoc and destruction on innocent victims," Barr said in testimony to the House Judiciary Committee.

Under an agreement between Oregon officials and the Trump administration on Wednesday, the federal forces were to begin withdrawing from the city on Thursday.

However, their pullout was conditional on local law enforcement ensuring the security of the federal courthouse and other buildings that have been targeted by protesters.

Acting Homeland Security Secretary Chad Wolf, who warned earlier this week a full pullout depended on the security situation "significantly" improving.

And on Thursday Trump reiterated the need for federal intervention.

"The governor and the mayor, we've been dealing with them, and we think they don't know what they're doing, because this should not have been going on for 60 days," he told reporters.

"It's not our job to go in and clean out the cities. That's supposed to be done by local law enforcement," Trump added.