By Taryn Luna

A federal judge dismissed the Trump administration's lawsuit against California's "sanctuary state" law on Monday. The decision marks a major victory for California in its ongoing battle with the federal government.

Attorney General Jeff Sessions took California to court earlier this year over three state immigration policies, arguing that lawmakers overreached their authority.

U.S. District Judge John A. Mendez approved California's motion to throw out the lawsuit related to two of those measures: Senate Bill 54, the sanctuary state law, and Assembly Bill 103, which allows the state attorney general to inspect detention facilities.

Mendez also rejected the Trump administration's lawsuit against a portion of Assembly Bill 450 that forces companies to inform workers within 72 hours of any federal requests to inspect employment records. The judge is allowing the case to move forward against other provisions of AB 450 that give the state the ability to fine employers who do not automatically reject any requests by the federal government to enter their workplaces without a warrant.

"Today's decision is a victory for our State's ability to safeguard the privacy, safety, and constitutional rights of all our people," California Attorney General Xavier Becerra said in a statement. "Though the Trump Administration may continue to attack a state like California and its ability to make its own laws, we will continue to protect our constitutional authority to protect our residents and the rule of law."

The California Legislature passed the three laws last year to prevent the federal government from seeking the state's help to uphold President Donald Trump's campaign promise to ramp up deportations. Mendez rejected the lawsuit as the Trump administration continues to grapple with backlash over its immigration policies.

State Sen. Kevin de León, who introduced the sanctuary state law in the Legislature, called the decision "a stunning defeat in the President's racist war on immigrants."

"The federal judge's decision not only affirms the constitutionality of the California Values Act, but our firm belief that our state resources should not be used to torment immigrant communities and tear families apart," de León, a Los Angeles Democrat, said in a statement.

Senate Bill 54 limits the ability of state and local law enforcement to help federal agents enforce immigration law and carves out major exceptions for immigrants previously convicted of more than 800 different crimes. The law, which went into effect this year, does not apply to the California prison system.

(c)2018 The Sacramento Bee (Sacramento, Calif.)