NEW YORK - Mayor Bill de Blasio on Wednesday said the decision to move protesters out of City Hall Park during the early morning hours had been in the works for the past few weeks.

During his daily briefing, the mayor said NYPD officers were sent in because the protest movement had been growing smaller. He also said he was not influenced by President Donald Trump’s threats to send in federal agents but a health and safety issue they had been looking at for days.

"What we saw change over the last few weeks was the gathering there got smaller and smaller, was less and less about protests and more and more became an area where homeless folks were gathering. I said repeatedly we do always respect the right to protest, but we have to think about health and safety first and the health and safety issues were growing. So it was time to take action," de Blasio said.

At least seven people were arrested as riot gear-clad officers cleared out roughly 50 people remaining inside the encampment in Lower Manhattan just before 4 a.m.

According to police, occupiers were given a 10-minute warning to clear out before police pushed in.

Police say while the action was peaceful and most agreed to go voluntarily there was an incident of a brick being thrown at an officer.

The officer was not injured.

No other injuries at the scene were reported.

Police continued to barricade off the area surrounding City Hall late Wednesday night.

Officers in riot gear and batons secured the perimeter following an early morning raid of the Occupy City Hall encampment.

The NYPD blocked off several intersections including the corner of Chambers and Centre streets, where several municipal buildings still bear graffiti.

A group of several hundred protesters briefly marched around the area Wednesday night to show support for the protesters who were kicked out of the encampment earlier in the day. 

“They want to know why the police pushed them out without a reason. You didn’t give no warning or anything like that,” one protester said.

“They just came in there, they got an order from whoever they got the order from, they got the order, and they came in, rush in, shielded up, batons out, not asking any type of questions,” he went on to say.

Cleanup efforts began at the encampment after protesters were cleared out.

Police say the park will be on lockdown for several weeks during the cleanup effort.

Protesters had been camping out at the park near City Hall for several weeks but more recently the site had become occupied by the homeless.

It sprung up at the height of police brutality protests around the city and a budget fight to defund the NYPD.

Mayor de Blasio on Tuesday said a decision to move the encampment out would be made by the NYPD.

The administration has been under scrutiny over its handling of the site and surrounding area which has seen a large amount of graffiti.

Spray painted messages have covered the sidewalks around City Hall Plaza, the Municipal Building across the street and the Tweed Courthouse for weeks.

When asked if he felt pressure to show equal justice in cleaning up the graffiti like had been quickly done with defaced Black Lives murals in the city, Mayor de Blasio said Tuesday it was a "complicated situation" around City Hall that needed to be handled smartly.