The council voted 13-0 to approve the law, which codifies protections for migrants in the country illegally and closes a gap in past policies by prohibiting the direct or indirect sharing of data with federal immigration authorities.
Council members Traci Park and John Lee were absent during the vote.
The ordinance now heads to Mayor Karen Bass for her signature, and once approved will go into effect within 10 days as a result of an urgency clause attached to it.
Tuesday's vote came two weeks to the day after Donald Trump's victory in the presidential election following a campaign in which he stressed border security and promised to deport people who are in the U.S. illegally.
Democrats plan to fight Trump's mass deportation plan
Outside City Hall, immigrant groups made their voices heard to urge the council to approve the sanctuary city ordinance.
"Immigrant Angelenos are facing their greatest attacks," said Angelica Salas from CHIRLA, the Coalition for Humane Immigrant Rights of LA. "Those attacks are coming from the incoming administration that has said to us a very clear threat. Mass arrest and deportations."
Representatives for the president-elect did not immediately respond to a request for comment, but the Los Angeles County Republican Party issued the following statement:
"A country without secure borders isn't a country at all. So-called sanctuary' cities and states sound warm and fuzzy, but the protections they offer aren't for abuelas getting ice cream, they're for people who've entered the country illegally and committed additional crimes. Whether drunk driving, robbery, sexual violence, assault or murder, none of those should go unpunished. Perpetrators should definitely not be protected by the largesse taken from hard-working taxpayers.
"If the city of Los Angeles would like to have thriving, safe, clean streets and businesses in time for the Olympics, maybe they could accept the will of the people who recently tossed George Gascón out on his ear and focus on public safety for everyone."
While Los Angeles has prohibited the use of its resources from assisting federal immigration authorities in past years, the sanctuary ordinance would make the policy official.
Trump says former ICE Director Tom Homan will join administration as border czar
Some at the state level worry it would cause more serious issues.
In part, the ordinance enshrines protections issued by former Mayor Eric Garcetti during the first Trump administration. Additionally, the council adopted changes to the language so it aligned with California's "sanctuary state" law, known as SB 54 or the California Values Act of 2017.
"What's going to happen is if they're not going to cooperate, ICE is going to have to go out into the community and remove these individuals because it's going to happen with or without the support of the city," said assemblyman Bill Essayli. "What they are doing is, they're creating a very dangerous environment, not only for the officers, but for the public when they go out to do these enforcement operations."
The Los Angeles Police Department also complies with its Special Order 40, established in 1979, which mandates that its officers not inquire about immigration status or make arrests related to a migrant's legal status.
The ordinance does make an exception for the LAPD to assist enforcement of federal immigration law only for serious offenses -- an amendment introduced by Council President Marqueece Harris-Dawson.
He said it allows police to communicate with U.S. Immigration and Customs Enforcement for a migrant convicted of a violent felony, deported and returned to the United States. The amendment is similar to the department's current policy, which has only been invoked two times since 2018, he added.
Newly appointed LAPD Chief Jim McDonnell has said that the department would not engage in immigration enforcement.
For council members, passing the ordinance is about community safety.
"We recognize the duress many so many members of our community and we don't have a safer city if people are living in fear and hiding in the shadows and not cooperate with law-enforcement," said council member Monica Rodriguez.
City News Service contributed to this report.