SACRAMENTO — California flexed its political muscle Thursday, beefing up protections for undocumented immigrants under a controversial law signed by Gov. Jerry Brown that pushes back against President Trump’s policies.

Brown signed the bill to create a statewide sanctuary policy on the day Trump set as the deadline for immigrants aided by the federal Deferred Action for Childhood Arrivals program, or DACA, to request a two-year extension before the program is phased out. Brown also signed 10 other immigration-related bills that limit the growth of detention centers, expand education services for immigrants, and extend tenant and workplace protections for undocumented people.

Brown said the new laws will ensure “hardworking people who contribute to our state are respected.”

SB54, by Senate President Kevin de León, D-Los Angeles, bars law enforcement officers in the state from arresting individuals based on civil immigration warrants, asking about a person’s immigration status or participating in any joint task force with federal officials for the purpose of enforcing immigration laws.

The law also bars local jails from contracting with the federal government to house their detainees and holding immigrants for any reason if they are cleared for release on their state criminal cases.

The bill does not prohibit Immigration and Customs Enforcement or the Department of Homeland Security from enforcing federal immigration laws in California. Instead, the law says California will not use its own law enforcement resources to help in those actions.

“It will put a large kink in Trump’s perverse and inhumane deportation machine,” de León said Thursday at a news conference in Los Angeles.

The law, considered the most far-reaching protections passed by a state, takes effect Jan. 1.

“These are uncertain times for undocumented Californians and their families, and this bill strikes a balance that will protect public safety, while bringing a measure of comfort to those families who are now living in fear every day,” Brown wrote in his signing message on SB54.

Brown initially expressed concern about the bill but worked with de León on a compromise in September that cleared the way for the bill to pass the Legislature and reach his desk.

Supporters say the policies are needed to ensure undocumented immigrants do not fear deportation when they report crimes to law enforcement. Cities such as San Francisco, Los Angeles, Oakland and dozens of other jurisdictions in California already have sanctuary policies.

“With the stroke of a pen, the governor made good on his promise to ‘defend everybody — every man, woman and child — who has come here for a better life and has contributed to the well-being of our state,’” said Jennie Pasquarella, immigrants’ rights director at the American Civil Liberties Union of California.

Critics argued that the bill puts Californians in danger by allowing criminals to avoid deportation, while jeopardizing billions in federal funding. Changes made in the final days of the legislative session scaled back the bill by exempting immigrants with previous convictions for an estimated 800 crimes from the protections offered in the law. The law also exempts the state Department of Corrections and Rehabilitation from most aspects of SB54 but requires prisons to have written consent from inmates before allowing federal immigration agents to interview them.

Thomas Homan, the acting director of ICE, said in a statement last month that “by passing this bill, California politicians have chosen to prioritize politics over public safety.”

“Disturbingly, the legislation serves to codify a dangerous policy that deliberately obstructs our country’s immigration laws and shelters serious criminal alien offenders,” Homan said.

The California State Sheriffs’ Association also opposed the bill. Association President Bill Brown said he will continue to push for changes to what he sees as some of the most problematic parts of the law. He said those “include restricting our communications with federal law enforcement about the release of wanted, undocumented criminals from our jails, including repeat drunk drivers, persons who assault peace officers, serial thieves, animal abusers, known gang members and other serious offenders.”

Gov. Brown signed SB29 by Sen. Ricardo Lara, D-Bell Gardens (Los Angeles County), that freezes the growth of for-profit immigration detention facilities by preventing cities and counties from entering into new or modified contracts. California currently has four for-profit detention centers, in Adelanto (San Bernardino County), Bakersfield, Calexico (Imperial County) and San Diego.

Brown also signed AB450 by Assemblyman David Chiu, D-San Francisco, which requires employers to ask for a judicial warrant before allowing federal immigration officials into a workplace and bars employers from sharing their employees’ confidential information, such as Social Security numbers, without a subpoena. AB291, another Chiu bill signed Thursday by Brown, bars landlords from threatening to report a tenant to immigration officials.

“Gov. Brown understands that in an environment of division and fear, California must continue to defend its workers, to guard its values, and to ensure that its laws protect all of our residents,” said Chiu, a son of immigrants.

Melody Gutierrez is a San Francisco Chronicle staff writer. Email: mgutierrez@sfchronicle.com Twitter: @MelodyGutierrez

Governor turns 11 wide-ranging immigration bills into law

SB68 by Sen. Ricardo Lara, D-Bell Gardens (Los Angeles County): Expands a state law allowing undocumented immigrants to qualify for in-state tuition. Previously, the law said undocumented students had to have spent three years at a California high school and graduated. Under the new law, students can count years spent at a California community college or adult education courses toward the three-year requirement for in-state tuition.

SB156 by Sen. Joel Anderson, R-Alpine (San Diego County): Requires the California Department of Veterans Affairs and California National Guard to help undocumented immigrants serving in the military and veterans with their applications for citizenship.

SB257 by Lara: Allows students whose undocumented immigrant parents are deported to continue to attend their school regardless of where they or their parents reside.

SB29 by Lara: Prevents cities and counties from entering into new or modified contracts with for-profit immigration detention facilities.

AB21 by Assemblyman Ash Kalra, D-San Jose: Requires colleges and universities that offer Cal Grants to create policies that safeguard their campuses from immigration officials by ensuring personal information of students and faculty is not released and by notifying students and faculty when immigration agents are on campus.

AB299 by Assemblyman Ian Calderon, D-Whittier (Los Angeles County): Bars public agencies from compelling landlords to disclose immigration information on tenants.

AB343 by Assemblyman Kevin McCarty, D-Sacramento: Allows in-state tuition at California community colleges for Iraqi and Afghan nationals who have special immigrant visas to work with the American military.

AB699 by Assemblyman Patrick O’Donnell, D-Long Beach: Requires the state attorney general to develop model policies by April on how public schools can limit immigration enforcement on their campuses and requires school districts to adopt the policy or a similar policy by July.

AB450 by Assemblyman David Chiu, D-San Francisco: Requires employers to ask for a judicial warrant before allowing federal immigration officials into a workplace and bars employers from sharing their employees’ confidential information, such as Social Security numbers, without a subpoena.

AB291 by Chiu: Bars landlords from threatening to report a tenant to immigration officials.

SB54 by Senate President Pro Tem Kevin de León, D-Los Angeles: Sets limits on when local law enforcement agencies can help the federal Immigration and Customs Enforcement agency on deportation cases.