(AP Photo/Jonathan J. Cooper). Demonstrators block traffic in front of the hotel where U.S. Attorney General Jeff Sessions was speaking to the California Peace Officers Association meeting, Wednesday, March 7, 2018, in Sacramento, Calif.

(AP Photo/Rich Pedroncelli). California Gov. Jerry Brown is greeted by children as he walks through the Capitol with California Attorney General Xavier Becerra, left, to hold a news conference.

(AP Photo/Keith Srakocic). In this March 5, 2018, photo. Republican Rick Saccone, speaks at a campaign rally in Waynesburg, Pa. Saccone is running against Democrat Conor Lamb in a special election being held on March 13 for the PA 18th Congressional Di...

White House bolsters its final-days offensive in Pennsylvania to avoid another special election embarrassment.More >>

White House bolsters its final-days offensive in Pennsylvania to avoid another special election embarrassment.More >>

(AP Photo/Andrew Harnik, File). FILE - In this March 31, 2017, file photo, National Trade Council adviser Peter Navarro waits for President Donald Trump for an event in the Oval Office at the White House. Navarro signed on with the Trump campaign as a ...

The chief White House adviser on trade, Peter Navarro, is taking on renewed influence as President Donald Trump prepares to impose steep tariffs on steel and aluminum imports.More >>

The chief White House adviser on trade, Peter Navarro, is taking on renewed influence as President Donald Trump prepares to impose steep tariffs on steel and aluminum imports.More >>

SACRAMENTO, Calif. (AP) - The Trump administration's lawsuit challenging California's efforts to protect immigrants who are in the country illegally served as the latest warning shot at communities nationwide with so-called sanctuary policies.

As he excoriated California officials for their policies and actions, U.S. Attorney General Jeff Sessions warned against "rewarding" people who enter the country illegally.

"It's a rejection of law and it creates an open borders system," he told California law enforcement officials in Sacramento on Wednesday, just a few blocks from the state Capitol. "Open borders is a radical, irrational idea that cannot be accepted."

California Gov. Jerry Brown and state Attorney General Xavier Becerra, both Democrats, called Sessions' visit and the lawsuit a political stunt and denied that they want to give immigrants free rein to enter the country illegally.

Criticism of the lawsuit also came from sanctuary states and cities around the country.

Chicago Mayor Rahm Emanuel said in a statement that the administration "cannot bully or blackmail the City of Chicago into changing our values, nor can our values be bought."

Democratic Oregon House Speaker Tina Kotek called the Trump administration's lawsuit against California an attempt to "bully states," and promised to "make sure Oregon is a welcoming place for everyone, even in the face of these threats."

Oregon became America's first sanctuary state in 1987 with a law preventing law enforcement from detaining people who are in the United States illegally but have not broken other laws. Last year, Oregon's Legislature doubled down on the policy with a bill to strengthen it.

California's Brown and Becerra said the state is on firm legal ground with laws that limit police and employers' cooperation with federal immigration agents and require state inspections of federal detention facilities.

What Brown called "an act of war" comes as President Donald Trump is set to visit California next week to see models of his proposed wall along the Mexican border. The visit will be his first to California since his election. Meanwhile, administration officials planned to meet Thursday with four Colorado state lawmakers who oppose so-called sanctuary policies. It was not immediately clear if representatives from other states would also attend.

The lawmakers will discuss with the White House Domestic Policy Council "how we can stop sanctuary cities, restore law and order, and prevent gangs like MS-13 from bringing violence and drugs across our borders," Republican Rep. Dave Williams of Colorado Springs said in a statement.

Response to the Trump administration's lawsuit was divided along political lines, with much of the criticism coming from places that have waged their own legal battles with the Trump administration.

"The Trump administration is now openly attacking jurisdictions that are protecting their residents from unjust and unfair treatment by federal agents," said Seattle Mayor Jenny Durkan, a Democrat and former federal prosecutor, in a tweet.

The Trump administration has clashed repeatedly with Democratic mayors and state officials over its immigration policies, which have faced numerous setbacks in court. A federal judge in November permanently blocked Trump's executive order to cut funding from sanctuary cities in lawsuits brought by two California counties - San Francisco and Santa Clara.

A federal judge in Illinois in September in a lawsuit brought by the city of Chicago said the administration could not impose tough new immigration requirements on a key federal grant, including giving federal immigration officials access to jails.

California has also sued the administration over the grant conditions and filed a separate suit to protect some young immigrants from deportation. A federal judge in San Francisco in January blocked the Trump administration's decision to end the Deferred Action for Childhood Arrivals program, saying young immigrants were likely to suffer serious harm without court action.

The new federal lawsuit challenges specific California laws in a state that also is resisting the president on issues from marijuana policy to climate change. But comments by Sessions and Brown took the standoff to a new level Wednesday, with Sessions calling out state and local officials for "obstruction of law enforcement" and Brown calling Sessions a liar who is pandering to Trump to save his job.

California passed sanctuary laws in response to Trump's promises to sharply ramp up the deportation of people in the U.S. illegally. Sessions said several of them prevent U.S. Immigration and Customs Enforcement officers from making deportation arrests.

Former U.S. Attorney General Eric Holder, who led the Obama administration's successful lawsuit overturning Arizona's anti-illegal immigration bill, said California and other jurisdictions are permitted to limit their cooperation with federal immigration agents.

"The Supreme Court has made really absolutely clear that states cannot be forced to divert resources to help the federal government enforce federal law," said Holder, who now works for the California Senate on contract.

___

Associated Press writers Michael Tarm in Chicago, Tom James in Salem, Oregon, Lisa Baumann in Seattle, and Sudhin Thanawala in San Francisco contributed to this report.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

(AP Photo/Matt Rourke, File). FILE - In this May 16, 2012, file photo, the Facebook logo is displayed on an iPad in Philadelphia. Facebook suspended Cambridge Analytica, a data-analysis firm that worked for President Donald Trump's 2016 campaign, over...

A former employee of a Trump-affiliated data-mining firm says the firm "took fake news to the next level".

(AP Photo/Matt Rourke, File). FILE - In this May 16, 2012, file photo, the Facebook logo is displayed on an iPad in Philadelphia. Facebook suspended Cambridge Analytica, a data-analysis firm that worked for President Donald Trump's 2016 campaign, over...

The head of the European Union's parliament says the bloc will investigate Facebook over the use of its data by a Trump-affiliated data-mining firm.More >>

The head of the European Union's parliament says the bloc will investigate Facebook over the use of its data by a Trump-affiliated data-mining firm.More >>

(AP Photo/Rich Pedroncelli, File). FILE - In this March 8, 2018, file photo, California gubernatorial candidate, state Treasurer John Chiang, a Democrat, speaks at a conference in Sacramento, Calif. Chiang will be joined family members of people who di...

California State Treasurer John Chiang is calling on the nation's largest public pension fund to stop investing in companies that sell assault-style weapons and devices that allow guns to fire more rapidly.More >>

California State Treasurer John Chiang is calling on the nation's largest public pension fund to stop investing in companies that sell assault-style weapons and devices that allow guns to fire more rapidly.More >>

New York City's deadly helicopter crash has prompted the National Transportation Safety Board to call on federal regulators to prohibit commercial flights that use passenger harness systems that do not allow for...More >>

New York City's deadly helicopter crash has prompted the National Transportation Safety Board to call on federal regulators to prohibit commercial flights that use passenger harness systems that do not allow for easy release.More >>

Nikolas Cruz appears in court for a hearing in Fort Lauderdale, FL, on Monday, Feb. 19. Authorities said Cruz’s brother was arrested for trespassing at the same school on Monday, March 19. (Source: Mike Stocker/South Florida Sun-Sentinel via AP, Pool)

Nikolas Cruz appears in court for a hearing in Fort Lauderdale, FL, on Monday, Feb. 19. Authorities said Cruz’s brother was arrested for trespassing at the same school on Monday, March 19. (Source: Mike Stocker/South Florida Sun-Sentinel via AP, Pool)

Authorities say the brother of the teen charged with killing 17 people at a Florida school has been arrested for trespassing at the same school.

The federal government is demanding that the company building a giant nuclear waste treatment plant in Washington state provide records proving that the steel used in the nearly $17 billion project is safe.More >>

The federal government is demanding that the company building a giant nuclear waste treatment plant in Washington state provide records proving that the steel used in the nearly $17 billion project is safe.More >>