The ordinance, which takes effect in 30 days, would restrict the presence of encampments, as well as sitting, lying and sleeping, in several areas of the city.
Restricted areas include within 500 feet of schools, day care facilities, parks and libraries. It also restricts encampments near fire hydrants, overpasses, freeway ramps, tunnels and railroad tracks among other public infrastructure.
People who violate the ordinance will face an infraction or citation, though higher fines and misdemeanor charge are possible for anyone who continues to refuse to comply or interferes with a city employee trying to enforce the ordinance.
The Los Angeles City Council passed the measure 13-2 on Wednesday.
Councilman Joe Buscaino, who proposed the ordinance 10 months ago, acknowledged it doesn't go far enough. He had tried to amend the ordinance to stop people from camping anywhere in the city if they have already been offered shelter.
"If we all agree that the status quo is unsustainable, that street encampments are dangerous to the housed and unhoused, why would we allow them anywhere if an alternative exists?" Buscaino said.
Councilman proposes ordinance to restrict homeless encampments
Similar anti-camping laws already exist in a number of cities, including San Francisco, Santa Monica and Long Beach.
Councilman Mike Bonin and Councilwoman Nithya Raman voted against the ordinance.
Before the vote, Bonin 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.
In explaining his decision to vote against the ordinance on July 1, he shared with council members his own experience being unhoused, saying: "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.''
City News Service contributed to this report.