(CNN) -- The city of Chicago says it plans to file a lawsuit against the US Justice Department on Monday over new stipulations placed on federal law enforcement grant money requiring local police departments to assist in federal immigration actions.
Mayor Rahm Emanuel's office said in a statement that the Trump administration's "latest unlawful misguided action undermines public safety and violates" the Constitution. He said the city is challenging the administration "to ensure that their misguided policies do not threaten the safety of our residents."
The legal action comes amid Trump administration threats to cut off funding for so-called sanctuary cities, including Chicago. The city, which emphasizes that Chicago and its Welcoming City ordinance are in compliance with the law, wants the court to render the federal stipulations unlawful.
"Chicago will not be blackmailed into changing our values, and we are and will remain a welcoming city," said Emanuel. "The federal government should be working with cities to provide necessary resources to improve public safety, not concocting new schemes to reduce our crime fighting resources."
The suit revolves around new conditions set for an important funding program: the FY2017 Edward Byrne Memorial Justice Assistance Grant, or JAG, which provided federal funding to support local law enforcement efforts, according to the statement.
Chicago last year got $2.3 million in JAG funds. Over the years the city has purchased SWAT equipment, police vehicles, radios and Tasers with the money.
Applications for the grants in fiscal year 2017 are due on September 5. The program is named for Edward Byrne, a New York City police officer who was killed in 1988. He had been protecting a Guyanese immigrant who reported illegal activity to police.
Chicago argues the new conditions placed on the grant program "effectively federalize local detention facilities and violate the Fourth Amendment."
The conditions include:
-- "Compliance with a federal statute that bars restrictions on federal-local sharing of immigration status information";
-- "Unlimited access to local police stations and law enforcement facilities by US Department of Homeland Security personnel to interrogate arrestees"; and,
-- "The requirement that cities provide DHS with at least a 48 hour notice prior to an arrestee's release, which would require detaining residents longer than is permissible under the Fourth Amendment of the United States Constitution."
The Constitution's Fourth Amendment protects against "unreasonable searches and seizures."
Chicago Corporation Counsel Ed Siskel said the attorney general's office doesn't have "the authority to add these requirements to a grant program created by Congress and cannot commandeer local law enforcement to carry out federal immigration law functions."
Chicago's Welcoming City ordinance "prioritizes effective local law enforcement and crime prevention over federal civil immigration issues."
"This ordinance promotes public safety by ensuring that no city resident, regardless of their status, is afraid to cooperate with law enforcement, report criminal activity to the police, serve as a witness in court, or seek help as a victim of crime," the news release said.
Police Superintendent Eddie Johnson said federal funding and agents have greatly helped Chicago fight crime.
"The federal government has been an effective partner in the crime fight, as funding and additional federal agents have greatly helped us to take guns off the streets and make our communities safer," said Johnson.
"Removing those resources, regardless of the reason, makes CPD's mission to protect all residents in Chicago that much more difficult."
The Justice Department earlier this year sent letters to officials in so-called sanctuary cities, including Chicago, with a message: Provide immigration information on people arrested or lose federal funding.
The threats could result in the loss of billions of dollars in federal grants that pay for a range of programs for crime and domestic violence victims, drug treatment, missing and exploited children, forensic labs, services for disabled people, and boys' and girls' clubs.
In Chicago, $3.6 billion in federal funds are at stake, possibly jeopardizing money to pay for everything from feeding low-income pregnant women to repairing roads and bridges, according to a recent analysis by the Better Government Association, a nonpartisan state watchdog group.
In May, the city launched a campaign in response to President Donald Trump's threats to cut off funding for sanctuary cities. "One Chicago" was recently established in response to the growing needs of the city's refugee and immigrant populations.
The campaign slogan reads: "Three million residents, three million stories, one Chicago."