Embed from Getty Images

The federal agents who have clashed with protesters in Portland will begin a “phased withdrawal” from the city's downtown area starting Thursday, Oregon's Democratic Gov. Kate Brown announced.

Acting Secretary of Homeland Security Chad Wolf said in a statement that he and Brown have been in contact over the past 24 hours and reached a joint plan to end "the violent activity in Portland directed at federal properties and law enforcement officers,” Fox News reports.

“That plan includes the robust presence of Oregon State Police in downtown Portland,” Wolf said. “State and local law enforcement will begin securing properties and streets, especially those surrounding federal properties, that have been under nightly attack for the past two months. Oregon State Police will coordinate with Federal Protective Service (FPS) officers to ensure all federal facilities remained protected and secure."

“Our local Oregon State Police officers will be downtown to protect Oregonians' right to free speech and keep the peace. Let's center the Black Lives Matter movement's demands for racial justice and police accountability. It's time for bold action to reform police practices," the governor tweeted.

Crowds -- ranging from hundreds to thousands of people -- have tried almost every night to tear down a fence erected to protect the Mark O. Hatfield U.S. Courthouse. They’ve set fires and hurled fireworks, Molotov cocktails, and bricks, rocks, and bottles at the agents inside. Authorities this week reinforced the fence by putting concrete highway barriers around it. Federal officers often respond by firing tear gas, pepper balls, and impact munitions.

Numerous federal officers have been injured in the riots.