San Francisco is suing the Department of Justice over its threat to pull federal grant funding if the city does not let immigration agents into its jails.

San Francisco City Attorney Dennis Herrera and California Attorney General Xavier Becerra announced the lawsuit was filed during a press conference from San Francisco City Hall on Monday.

Becerra is expected to file a similar lawsuit on behalf of the State of California later today, in opposition of the Trump administration's effort to get cities and states to cooperate with the federal government on immigration matters.

"These conditions do not appear in any federal statute, and they do not reflect the will of Congress in appropriating funds," the lawsuit said. "To the contrary, the new conditions are simply the latest attempt by the Trump administration to coerce state and local jurisdictions into carrying out the federal government's immigration enforcement priorities."

The suit was filed against Attorney General Jeff Sessions, Acting Assistant Attorney General Alan Hanson and the Justice Department.

"We're in the public safety business, not in the deportation business," Becerra said Monday.

In a statement, Herrera said President Trump is "bent on trying to vilify immigrants and punish cities that prioritize real, effective public safety over splitting up hard-working families."

Herrera's office cited research showing that immigrants are less likely to commit crimes than native residents, as well as data showing that sanctuary jurisdictions have lower crime and less poverty.

"We're safer when all people, including undocumented immigrants, feel safe reporting crimes to authorities," Herrera said.

The suit seeks a court order declaring the grant conditions "unconstitutional and void."

Last month, the Justice Department said that in order for a city to receive any Edward Bryne Memorial Justice Assistance Grants for fiscal year 2017, jurisdictions would have to comply with federal law and allow agents from Immigration and Customs Enforcement into jails to communicate with suspected illegal immigrants. San Francisco stands to lose $1.4 million in JAG grants in the coming fiscal year, and California could lose $28.3 million.

The new guidelines are part of Sessions' broader promise to crack down on illegal immigration and jurisdictions that adopt so-called sanctuary policies, and go into effect fiscal year 2017.

"So-called ‘sanctuary' policies make all of us less safe because they intentionally undermine our laws and protect illegal aliens who have committed crimes," Sessions said in July.

According to the Immigrant Legal Resource Center, more than 600 cities, counties and states have some type of sanctuary policy.

Cities receiving the grants must also:

  • Prove compliance with a federal statute showing they do not block law enforcement officers from sharing immigration status information with ICE, and
  • Give Department of Homeland Security/ICE a 48-hour notice before releasing anyone ICE has requested.

In April, U.S. District Judge William Orrick III of San Francisco blocked President Trump's Jan. 25 executive order that would have made good on a threat to strip funds from sanctuary cities.

The website for San Francisco Mayor Edwin Lee proudly declares: "We Are a Sanctuary City."

"Since 1989, San Francisco has proudly been a Sanctuary City. We will stand shoulder-to-shoulder with our immigrant communities and fight for the progress we've achieved in this City. We are a sanctuary city, now, tomorrow and forever," the website says.

Democratic California Gov. Jerry Brown said this month he endorsed the idea of the state taking the administration to federal court.

"The people of San Francisco know all too well the pain and suffering associated with the tragedy resulting from local jurisdictions that refuse to cooperate with federal immigration authorities. So it's especially disappointing that San Francisco is less concerned with keeping its constituents safe than it is spending time and taxpayer money protecting criminal aliens and putting San Francisco's law enforcement at greater risk," Justice Department spokesman Devin O'Malley said in a statement.