The lawsuit claims that the statutes “reflect a deliberate effort by California to obstruct the United States’ enforcement of federal immigration law.” It also says the laws regulate private entities that want to cooperate with the federal authorities and “impede consultation and communication between federal and state law enforcement officials.”
Mr. Brown called the lawsuit a “political stunt.”
“At a time of unprecedented political turmoil, Jeff Sessions has come to California to further divide and polarize America,” Mr. Brown said in a statement. “Jeff, these political stunts may be the norm in Washington, but they don’t work here. SAD!!!”
California began battling the Trump administration even before Mr. Trump took office, standing in opposition on a number of issues, including marijuana, environmental regulations and taxes. But immigration has proved to be the most contentious fight, with local officials assuring undocumented immigrants that they would do all they could to protect them.
Last year, California enacted the sanctuary laws, which restrict when and how local law enforcement can cooperate with federal immigration enforcement officers.
Both Mr. Sessions and Mr. Trump have threatened to pull federal grant money from cities and states that have sanctuary laws to protect undocumented immigrants. They argue that the policies flout federal laws and help criminals evade deportation.
And the Justice Department asked 23 jurisdictions across the country this year to provide documentation that they had not kept information from federal immigration authorities, or receive a subpoena for the information. It is also exploring possible criminal charges for local politicians who enact sanctuary policies.
The lawsuit filed on Tuesday evening in Federal District Court in Sacramento is the first against a local or state government over its immigration policies filed by the Justice Department under Mr. Sessions. Department officials said that they would not rule out the possibility of other lawsuits against local governments whose policies interfere with the federal government’s authority on immigration. Colorado, Illinois, New Mexico, Oregon and Vermont have state sanctuary laws, as do cities and counties in more than a dozen states, according to the Center for Immigration Studies.
One, the California Values Act, strictly limits state and local agencies from sharing information with federal officers about criminals or suspects unless they have been convicted of serious crimes. The law, which took effect Jan. 1, was the centerpiece of the State Legislature’s effort to thwart the Trump administration’s immigration policies.
Soon after the law was enacted, Thomas D. Homan, the acting director of United States Immigration and Customs Enforcement, said that the state should expect to see “a lot more deportation officers” and that elected officials who support the policy should be arrested.
“We’ve got to start charging some of these politicians with crimes,” he said. “These politicians can’t make these decisions and be held unaccountable for people dying. I mean, we need to hold these politicians accountable for their actions.”
Mr. Homan and three other immigration and border protection officials filed declarations with the suit claiming that California’s laws had already negatively affected their work.
“The administration is just angry that a state has stood up to them — one that embraces diversity and inclusivity and is the sixth-largest economy in the world thanks to the hard-working immigrants who want to become American citizens,” said Kevin de León, the leader of the California State Senate who wrote one of the sanctuary city laws named in the suit.
State lawmakers also passed the Immigrant Worker Protection Act, which prohibits local business from allowing immigration to gain access to employee records without a court order or subpoena. Mr. Becerra warned that anyone who violated the new law would face a fine of up to $10,000.
In the state budget bill, California lawmakers prohibited new contracts for immigration detention in the state and gave the state attorney general the power to monitor all state immigration detention centers.
The state and several local governments including the cities of San Francisco and Sacramento have also set up legal defense funds to help defend immigrants during deportation proceedings.
“I’m worried about the ‘Dreamers,’ hard-working immigrant families and law-abiding people who are just trying to make their way like the rest of us,” Mayor Darrell Steinberg of Sacramento said this year when asked about the state’s sanctuary legislation. “Civil disobedience is a respectful way to show your love for country.”
Tensions between local and federal officials reached yet another height last week, when Mayor Libby Schaaf of Oakland publicly warned of coming large-scale immigration arrest operations. Mr. Homan compared the mayor to a “gang lookout yelling, “Police!” and said she gave people living in the United States illegally a chance to flee. He said her warning meant that the federal immigration authorities arrested about 200 people rather than the 1,000 they had anticipated rounding up.
Although Mr. Homan and other federal officials have warned about targeting California as it steps up immigration enforcement efforts, the number of people arrested has not drastically increased so far. In December, the most recent month for which data is available, 1,715 unauthorized immigrants in California were arrested by ICE, compared with 1,379 in December 2016.
This is not the first time that the Justice Department has sued a state. During the Obama administration, the department filed a civil rights lawsuit against Georgia for segregating students with disabilities from classrooms and sued North Carolina over a bill to restrict bathroom use for transgender citizens. Mr. Sessions withdrew that lawsuit.
In a call with reporters on Tuesday night, Mr. Becerra said that he was confident California would prevail in court and that state and federal laws were not in conflict.
“In California, our state laws work in concert with federal law,” he said. “Our teams work together to go after drug dealers and go after gang violence. What we won’t do is change from being focused on public safety. We’re in the business of public safety, not deportation.”
Mr. Becerra said that he was not surprised by the news of the lawsuit and that the state had already won legal battles against the Trump administration. “We’ve seen this B-rated movie before,” he said. “We’re not doing their bidding on immigration enforcement and deportation.”