SAN FRANCISCO (AP) — The state of California and city of San Francisco are suing the U.S. Department of Justice over President Donald Trump’s sanctuary city restrictions on public safety grants.

In a news conference Monday, Attorney General Xavier Becerra and City Attorney Dennis Herrera, both Democrats, announced the lawsuit, which makes California the first state to challenge the administration on its policy of denying some public safety funds to sanctuary cities and counties that limit cooperation with enforcement of U.S. immigration laws.

READ MORE: Bay Area Health Workers Cheer Newly-Approved 1-Shot Johnson & Johnson Vaccine

San Francisco also filed its own federal lawsuit Friday regarding federal restrictions on the Edward Byrne Memorial Justice Assistance Grants, which both men said provide for a range of crime fighting and crime prevention programs. They said about $28 million is at stake for California and $1.5 million for San Francisco.

“It’s a low blow to our men and women who wear the badge, for the federal government to threaten their crime fighting resources in order to force them to do the work of the federal government when it comes to immigration enforcement,” Becerra said.

Chicago filed a similar suit last week, arguing that the Trump administration’s bid to withhold public safety grants from so-called sanctuary cities is illegal.

In response, U.S. Attorney General Jeff Sessions has said the Trump administration “will not simply give away grant dollars to city governments that proudly violate the rule of law and protect criminal aliens.”

Both men are strong supporters of sanctuary protections, with largely prohibit local law enforcement from cooperating with federal immigration authorities. Supporters say the protections promote overall public safety by allowing immigrants who are in the country illegally to report crimes without fear of federal deportation.

READ MORE: Antioch Gas Station Shooting Leaves Man Suffering Life-Threatening Injuries

Opponents say such people should not be in the country.

The California Legislature is considering a measure nicknamed the “sanctuary state bill” that would limit state and local police from cooperating with federal immigration agents. Supporters of the legislation, SB54, say it rebukes the president for his crackdown on illegal immigration.

The Senate passed the measure earlier this year, sending it to the Assembly where it still requires a vote. It would also need approval from Democratic Gov. Jerry Brown, who has said the bill needs changes but has declined to say specifically what he wants altered.

San Francisco sued the administration in January over the president’s move to cut funding to immigrant-protecting “sanctuary cities” via executive order. A federal judge temporarily halted the executive order as the lawsuit progresses.

Becerra said he was filing on behalf of smaller cities and counties that may not have the resources to challenge the federal administration.

MORE NEWS: Hundreds Rally in San Mateo to Denounce Violence Against Asian Americans

© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.