The U.S. Court of Appeals for the Ninth Circuit on Thursday largely affirmed a district court ruling that denied the Trump administration’s request to block California laws limiting cooperation with federal enforcement officials.

The decision leaves intact almost all the provisions in three statutes—AB 103, and AB 450 and SB 54—enacted by the Democratic-controlled Legislature to thwart the federal government’s crackdown on undocumented immigrants.