SACRAMENTO (CBS13) — Sacramento will soon clear out homeless camps near levees and public infrastructure in the city limits.

Homeless communities have been carving out camps in the levees, and city leaders say it puts Sacramento and surrounding communities at risk for fires and floods. The ordinance passed on Tuesday bans camping within 25 feet of the levee. The law will now kick the homeless out, and protect what city leaders call “critical infrastructure.”

Current law said governments cannot cite or tell people not to sleep in public if there is not enough room in shelters unless the camping disrupts public health or safety. After a CBS13 report last May, state lawmakers drafted a bill that would have given flood control districts the authority to have encampments removed. The bill did not make it to the Governor’s desk.

RELATED: Activists Say New City Ordinance Will Push Homeless Into Sacramento Neighborhoods

The city council ordinance which passed on Tuesday is an effort to protect critical infrastructure, prevent wildfires and floods. Homeless advocates condemned the law, arguing the city should focus on creating more shelters and housing.

City council has Voted unanimously to pass this ordinance– @CBSSacramento https://t.co/EDNudgudIq — Marissa Perlman (@MPerlmanNews) February 26, 2020

“If you put this ban into effect, all of these people are going to be brought up from the river and be put back in front of the businesses, in front of the neighborhoods, and the police are going to sweep them every 72 hours. How is anybody going to get anywhere?” Crystal Sanchez with the National Union of The Homeless said.

READ: Nine Trailers Arrive In Stockton To Help House Homeless Families

Kevin King works for Reformation District 1000, which services the Sacramento-area levees.

“We have a significant concern with debris, tarps, tents to prevent us from achieving our core basic objective of levee protection. I cannot understate how important it is for us to monitor and inspect our levee system every day,” King said.

When it comes to fires, Fire Marshall Jason Lee says from May to October last year there were more than 1,000 fires associated with encampments in the city.

“The fires and damage to these areas can place the public in danger for fires near critical infrastructure,” he said.

The ordinance only prohibits camping to certain areas, like the levee. Camping would still be permitted in other parts of the city. Those caught in prohibited areas would have 24 hours to move.

ALSO: California Lottery Didn’t Give $36M To Schools, Auditor Says

But homeless advocates are condemning the law, arguing the city should focus on creating more shelters and housing, calling it a violation of civil rights.

Faye Wilson Kennedy, with Sacramento Poor Peoples’ Campaign, said, “You can’t just remove people with nowhere to go, we do need to open up some space.”

CBS 13 asked William Mercer who lives along the levee where he will go now. He said, “I’ll have to find somewhere else to go.”

This ordinance will go into effect 30 days from Tuesday.