New York City and a coalition of states filed separate lawsuits against the Trump administration Wednesday for withholding a federal law enforcement grant from so-called "sanctuary" jurisdictions. The lawsuits seek to strike down conditions to the grant that require states and localities to cooperate with federal immigration authorities. The U.S. Department of Justice has not released $4 million in criminal justice funding to New York City, according to the city's lawsuit. The federal agency has also threatened to claw back millions allocated in previous years, lawyers for the city said. New York State Attorney General Barbara Underwood's office said in a press release that New York could stand to lose $9 million in federal funding statewide if the federal rule is upheld. Her office is leading the state's lawsuit with five other states. The DOJ placed conditions on funding from the Edward Byrne Memorial Justice Assistance Grant program in July 2017 that effectively imposed a requirement that states and local governments comply with officers from U.S. Immigration and Customs Enforcement. The rule requires that those agents have access to correctional facilities and be given advance notice if an immigrant is released from custody. It also prohibits states and localities from blocking their officials from speaking with ICE about an immigrant. New York City has identified itself as a "sanctuary city," meaning local law enforcement generally does not refer undocumented immigrants to federal authorities unless a violent or serious crime has been committed. In its lawsuit, the city claims that the conditions placed on the grant are illegal. “The conditions DOJ seeks to impose are an unprecedented and unconstitutional intrusion on the city's policy prerogatives, are inconsistent with the intent of Congress and diminish the city's safety,” said Zachary Carter, the city's corporation counsel. “As detailed in our complaint, DOJ's efforts would cause immigrant communities to disengage from public services and retreat into the shadows, to the detriment of their own safety and that of the public.” New York state said in its lawsuit that the grant funding has been used in the past to support a multi-county program to combat gun violence, improve criminal records systems, enhance the services of forensic labs, and support prosecution and defense services. The funding currently withheld from the state would be used to support drug treatment programs, purchase fingerprint scanning technology, support investigations into non-fatal shootings, support prosecutors in combating illegal gun trafficking, and more. The funding was already allocated in this year's state budget to support those programs, so the state will have to either pick up the tab or abandon those initiatives if the federal grant falls through. Underwood said the Byrne JAG grant is the primary source of federal criminal justice funding for states and local governments. “This is a political attack on New Yorkers at the expense of our public safety and it is unlawful,” Underwood said. “The Trump administration simply does not have the right to require state and local police to act as federal immigration agents.” The states claim in their lawsuit that the administration's conditions on the grant are an overreach by the federal government in its authority over states and that federal law does not give the DOJ the power to impose those conditions.