California is home to more undocumented immigrants than any other state, and liberal state lawmakers have been rallying to protect that population as President Trump has taken a harder line on immigration. Among their most ambitious strategies: passing a so-called “sanctuary state” bill. And after votes on Friday and Saturday, it appears that bill will become law.

The state assembly voted 49 to 25, largely along party lines, to pass the measure, following the state senate’s approval in April. The bill then returned to the senate for another vote, where it passed 27 to 11 early Saturday morning. It now goes to the desk of California Gov. Jerry Brown, who previously worked with lawmakers to add amendments that would be necessary for his approval and is expected to sign it.

Given that sanctuary cities have drawn the ire of the President — including threats to withhold federal funds from such jurisdictions — it is likely that further tussles between the federal government and the nation’s most populous state are coming.

Here are the basics of the bill, officially known as SB54.

What does the bill do?

The bill’s core aim is to limit the ways that state and local officials can cooperate with federal immigration enforcement. Measures range from treating schools and courthouses as “safe zones” to restricting the ability of law enforcement to detain people on behalf of federal immigration officers. Though Brown worked to soften the bill, allowing for more interaction with federal authorities, experts like Santa Clara University law professor Pratheepan Gulasekaram say the measure still provides the most robust “protection available for non-citizens anywhere in the U.S.”

So what exactly does it mean to be a sanctuary state?

There is no set meaning, as there is no single set of policies that makes someplace a “sanctuary city.” The general idea is that officials in a “sanctuary” jurisdiction won’t go out of their way to help the federal government deport people, even if they will cooperate in certain cases. These policies are often passed on the city or county level. Other states, such as Illinois, have passed laws aimed at shoring up immigration protections statewide. But none are as comprehensive as SB54, Gulsekaram says. On Friday, Democratic state lawmakers argued that undocumented immigrants are crucial in contributing to the state’s economy and culture and that state and local resources should not be “used to tear families apart.”

Does that mean people in California won’t be deported?

No. Some immigrant rights advocates don’t like the phrase “sanctuary state” because they believe it gives a false impression of the amount of protection California can provide. (Others don’t like it because the word “sanctuary” has become an epithet to many conservatives. And others object to it because they believe it might suggest to undocumented criminals that they’ll be safe from the law in the state.) Nothing in the bill prevents federal immigration authorities from coming into California. But given that the feds have limited resources, their ability to target individuals in the state is lessened when local officials aren’t willing to help.

Why can’t the federal government just force local agents to assist them?

While immigration policy is the purview of the federal government, court cases have found that the federal government cannot force state and local officials to carry out federal laws or simply commandeer local officers and turn them into unwilling deputies. To some extent, the Trump Administration can use money — either as a carrot or a stick — to entice cooperation, which is why the federal Department of Justice has threatened to withhold funds from sanctuary jurisdictions. Cities and counties in California have, however, pushed back on that move in lawsuits.

What about concerns that criminals will slip through the cracks?

That is a criticism that has been voiced by the California State Sheriffs’ Association, which has argued that public safety could be endangered if officials are limited in their ability to work with federal authorities. In some cases, for example, the measure would bar them from alerting immigration officers when an undocumented person has served time for a crime and is about to be released. The bill was amended early on to allow for cooperation in cases that involve violent or serious felonies such as murder, rape, kidnapping and robbery. And, after the negotiations with Brown, that list of crimes is much longer. But the sheriffs association says “the bill still goes too far in cutting off communication.”

Several Republican state lawmakers echoed those arguments on Thursday. Assemblyman Steven Choi, an immigrant himself, said that the measure would send a message around the world that the state will welcome immigrants no matter how they came to the country and no matter their criminal background, causing “chaos” and undermining “law an order.”

Why is limiting communication so important to advocates?

State Senate Leader Kevin de Leon, the author of the bill, has argued that public safety will be undermined if the law isn’t passed. It is estimated that more than 2 million undocumented people live in California — with hundreds of thousands from Asia as well as Latin America — and advocates say many will be scared to interact with official institutions if they fear that will put them on federal immigration agents’ radar. They say individuals might not report violent crimes to police, might not send their kids to school or might not seek medical care at the local hospital. And there is some evidence to back that up: Earlier this year, the Los Angeles Police Department said that Latino communities were reporting fewer instances of sexual assault and domestic violence because of concerns about deportation under Trump.

What will this mean for Dreamers?

In early September, Trump announced that he is ending the program known as DACA, or Deferred Action for Childhood Arrivals. Under that Obama-era policy, young people known as “Dreamers” who were brought to the country illegally as children would be protected from deportation and given the ability to work. While California and several other states have filed a lawsuit over Trump’s decision, many nervous Latino communities are preparing for those assurances to go away. That means “the real protection going forward is going to be at the state and local level,” says Santa Clara’s Gulsekaram, “and California is staking its claim.” The state cannot match the “psychological reprieve” of the program, he notes, but bills like SB54 will likely lead to “people feeling much more comfortable in places like California than they do elsewhere.”

How is Trump going to react to all this?

The Trump Administration could attempt to deny more federal funds to the state over the measure, but the end result would likely be decided by the courts. In any case, becoming a “sanctuary state” is unlikely to improve relations between California and the federal government. The state has already been acting as a seat of Democratic resistance in many ways — pushing back on climate change, the proposed border wall, energy efficiency standards — and California Attorney General Xavier Becerra has vowed to protect immigrants, regardless of their legal status, on several occasions.

The President’s name came up several times during the vote on Friday. Republicans accused liberals state lawmakers of using the bill as a “football” in a “political posturing” game between the state and federal government. Democrats meanwhile argued that actions at the federal level made the bill more necessary than ever. “We can be a shining example,” said Assemblymember Joaquin Arambula, noting that his grandparents came to the country without papers, “of what we should be aspiring for.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katy Steinmetz at katy.steinmetz@time.com.