Oregon State Police have taken over the role of guarding a courthouse in Portland after more than 60 nights of protests that at times turned into violent riots, and increasingly targeted the federal building.

Stepping up state and local officers' presence was part of a deal between the Democratic governor and the Trump administration that aimed to draw down the number of U.S. agents during the unrest.

Protests recently turned violent as local authorities tried to tamp down demonstrations that wracked the city every night for more than two months following the killing of George Floyd.

A demonstrator waves a U.S. flag in front of federal officers after tear gas is deployed during a Black Lives Matter protest at the Mark O. Hatfield United States Courthouse July 30, in Portland, Ore. (AP Photo/Marcio Jose Sanchez)

A demonstrator waves a U.S. flag in front of federal officers after tear gas is deployed during a Black Lives Matter protest at the Mark O. Hatfield United States Courthouse July 30, in Portland, Ore. (AP Photo/Marcio Jose Sanchez)

Portland police cleared out a park Thursday morning across from the Mark O. Hatfield Federal Courthouse that demonstrators have used as a staging ground, but reopened it shortly before dark.

OREGON STATE POLICE ARRIVE IN PORTLAND IN PUSH TO STOP RIOTS

By 10:30 p.m., hundreds had gathered and were listening to speeches in front of the Justice Center, a building one block from the courthouse that houses city and county law enforcement offices. There was no sign of state troopers or local police, and the crowd remained peaceful.

Police said Thursday night’s demonstration near the courthouse was less violent, although people at times “lit small fires along sidewalks on surrounding blocks and attempted to light fires inside the fence at the federal courthouse."

Under the deal announced by Gov. Kate Brown, federal agents sent by President Donald Trump began a phased withdrawal, with Oregon State Police taking over outside the building. But federal officials insist agents would remain on standby in case they’re needed.

Trump said in a tweet that U.S. officers would stay in Portland until the violence was under control.

“If she can’t do it, the Federal Government will do it for her. We will not be leaving until there is safety!” Trump wrote about Brown, saying that she wasn’t doing enough to control the “anarchists & agitators.”

In preparation for the handover, state troopers, the local sheriff and Portland police met and agreed not to use tear gas except in cases where there’s a danger of serious injury or death, Mayor Ted Wheeler said. Federal agents sent to the city in early July have used it nightly as protesters lob rocks, fireworks and other objects.

PORTLAND POLICE UNCOVER SLEDGEHAMMER, PIPE, OTHER WEAPONS WHILE CLEARING PARK OUTSIDE COURTHOUSE

Wheeler, who was gassed when he joined protesters outside the courthouse last week, added that tear gas “as a tactic really isn’t all that effective” because protesters have donned gas masks and often return after recovering. The mayor also apologized to peaceful demonstrators exposed to tear gas used by Portland police before federal officials arrived.

Portland has seen demonstrations since Floyd died in May after a White Minneapolis police officer pressed a knee into the Black man’s neck for nearly nine minutes.

Federal officers guard the Mark O. Hatfield U.S. Courthouse as a fire lit by protesters burns on the other side of a perimeter fence  July 25, in Portland, Ore. (AP Photo/Noah Berger)

Federal officers guard the Mark O. Hatfield U.S. Courthouse as a fire lit by protesters burns on the other side of a perimeter fence  July 25, in Portland, Ore. (AP Photo/Noah Berger)

They have at times attracted up to 10,000 people for peaceful marches and rallies around the city.

The Trump administration sent federal agents to guard the courthouse earlier this month and quell the unrest but the deployment had the opposite effect, reinvigorating protesters who found a new rallying point in opposing the federal presence.

CLICK HERE TO GET THE FOX NEWS APP

The U.S. government had arrested 94 people as of Wednesday. During the past two months of protests, Lovell said the city police department has made more than 400 arrests and undertaken many different strategies in an attempt to deescalate the situation.

“It’s been a long two months,” he said.

The Associated Press contributed to this report.