New Jersey's attorney general on Tuesday signed on to another challenge of President Donald Trump's crackdown on "sanctuary cities" -- local governments that look to shield undocumented immigrants from deportation.

The Garden State joined a multi-state legal filing supporting San Francisco's lawsuit claiming the Trump administration violated the constitution by withholding law enforcement grants from cities that limit cooperation with Immigration and Customs Enforcement and other federal agencies.

The move marked yet another action from state Attorney General Gurbir Grewal, who has spent his first weeks serving under Gov. Phil Murphy deploying New Jersey's legal resources to oppose Trump's policies on immigration and civil rights.

In July, the federal Justice Department announced it was placing the new condition on recipients of the Edward Byrne Memorial Justice Assistance program, which provides hundreds of millions of dollars in funding to state and local police.

New Jersey has received more than $4 million annually through the program, with more than $3 million going to local police departments to pay for anything from community policing programs to efforts combatting gangs, sexual assault or elder abuse.

Supporters of Trump's tough immigration policies say "sanctuary cities" -- a loose term for local governments that look to shield undocumented immigrants from federal authorities -- are breaking the law.

A federal judge last fall issued an injunction ordering the Justice Department to cease withholding the funds, but the Trump administration appealed.

The multi-state brief joined by Grewal on Tuesday asks the federal court to uphold the injunction, aruing the federal government was looking to "coerce" state and local governments into complying with Trump's immigration crackdown.

The attorney general previously signed on to a related legal challenge brought by the city of Chicago.

S.P. Sullivan may be reached at ssullivan@njadvancemedia.com. Follow him on Twitter. Find NJ.com on Facebook.