Six states and New York City sued the Trump administration on Wednesday for withholding funds from "sanctuary cities," NBC News reported.

Connecticut, New Jersey, Washington, Massachusetts, Virginia and New York states filed a joint lawsuit in Manhattan federal court, while New York City filed its own suit.

Cities across the U.S. have declared themselves "sanctuaries" since President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE's election, meaning they will not provide information about the legal status of immigrants within their jurisdictions to the federal government.

Trump has gone after these sanctuary cities since he came into office, threatening to withhold federal funding from them.

In July, the Trump administration announced a new policy that requires cities to alert federal agents when undocumented immigrants are released from police detention. If cities fail to comply, the federal government has said it will withhold public safety grants.

The Trump administration in recent weeks has worked to enforce the policy, alerting several cities that they will not receive public safety grants unless they comply with this requirement, NBC reported.

ADVERTISEMENT

The six states and New York City are alleging this policy is unconstitutional. The states together stand to lose a total of nearly $25 million in funds, and New York City could reportedly lose $4 million, according to NBC.

"Our message is clear: the Trump Administration's actions are illegal and morally bankrupt," New York City Mayor Bill de Blasio said in a statement. "We have proven, time and again, that welcoming immigrants has helped make this the safest big city in the country. Any attempt to jeopardize the trust between our local law enforcement and immigrant New Yorkers will fail."

The lawsuits allege the policy is unconstitutional. Federal courts in Illinois, Pennsylvania and California have already struck down the administration's ability to withhold funding.

Justice Department spokesman Devin O'Malley on Wednesday said the lawsuits are "a disservice."

"By choosing not to comply with a federal statute that promotes cooperation between local jurisdictions and federal immigration authorities, political leaders deliberately choose to protect criminal aliens in their custody and to make their communities less safe," O'Malley said, according to NBC.

New York Gov. Andrew Cuomo (D) declared his support for legal action on Wednesday.