LOS ANGELES (CBSLA) — A rally by advocates of L.A.’s homeless population did not deter city council members and Mayor Eric Garcetti from approving a new ordinance that restricts sleeping and homeless encampments in certain areas of the city.

The City Council voted 13-2 to approve the new ordinance and Garcetti signed it into law on Thursday.

The law prohibits the unhoused from making temporary shelters within 500 feet of schools, daycare facilities, parks, libraries and other locations throughout the city of Los Angeles.

Councilmembers Mike Bonin and Nithya Raman, who have been targeted for a recall for what opponents say is due in part to their response to the homelessness crisis, both voted against the measure.

RELATED: Efforts To Address Homelessness Crisis Along Venice Boardwalk Seeing Results

Bonin, who said he was formerly homeless and lived in his car for some time, spoke about the plight of the unhoused.

“Some of those nights I slept in the car, some of those nights, when my car was in the shop, I slept on the beach. I cannot tell you how much turmoil is in your heart when the sun is setting and you don’t know where to sleep. I cannot tell you how demoralizing and dehumanizing and defeating that experience is when you don’t know where you’re going to sleep,” Bonin said.

Bonin also cited the Los Angeles Homeless Services Authority’s statistic that the city only has shelter beds for 39% of the unhoused population.

“What about the other 61%?” Bonin asked.

There have been efforts throughout parts of the city of L.A. to address the homelessness crisis.

In Venice, some encampments were cleared out earlier this week with some of those who were living on the streets getting matched with permanent housing vouchers.

The 2020 Greater L.A. Homeless Count recorded 66,433 people living on the streets of L.A. County, a 12.7% increase from the previous year.

The ordinance preventing occupying and sleeping in certain areas of the city of L.A. will go into effect in 30 days.

(© Copyright 2021 CBS Broadcasting Inc. All Rights Reserved. City News Service contributed to this report.)