WASHINGTON: Chicago, one of America’s largest cities, has filed a lawsuit against the Justice Department over its plan to stop funding to cities which are refusing to cooperate on measures being enforced by President Trump’s administration against undocumented immigrants.

The Justice Department has plans to withhold federal public safety grants to the so-called “sanctuary city” a term that refers to cities which has vowed to protect undocumented immigrants in their jurisdiction by refusing to cooperate with federal agents chasing illegal aliens.

The lawsuit, announced by Chicago city mayor Rahm Emanuel, is aimed at new rules that require local governments to provide federal immigration authorities open access to jails and inform 48 hours in advance if they plan to release an inmate wanted on an immigration detainer, to be eligible to get federal funds.

“Chicago will not be blackmailed into changing our values, and we are and will remain a welcoming City,” Emanuel said in a statement late Sunday as quoted by the Washington Post. The lawsuit provoked a sharp rebuke from the Justice Department which accused the Chicago leaders of giving preference to illegal immigrants over the safety of police and citizens.

The grants that can be withheld under the Justice Department are used by cities to buy police vehicles and other equipment. The cities say they are not required to closely cooperate with federal immigration authorities and that doing so makes it more difficult to build trust in immigrant communities.

The new legal challenge comes amid continuing efforts by President Trump to make good on his election promises against immigrants by toughening federal laws.

Last week, President Trump endorsed a bill moved by his party’s senators to cut legal immigrants to half, mostly by cutting the number of visas granted to relatives of citizens by imposing new criteria that will favor those with English speaking skills and advanced degrees.

The US government currently issues more than a million green cards every year, most of them to relatives of citizens, while about 140,000 are given on the basis of job skills. Under the proposed legislation, the number of green cards will be cut by 41 percent in the first year and by 50 percent in the 10th year. If passed, the bill will hurt family-based immigrations.

President Trump has said that the proposed bill will help addressed problems of unemployment and overcoming economic challenges. Critics of the bill say it would not help achieve the desired results.

An editorial by the New York Times cited studies to argue that immigration boosts productivity and economic growth, and restricting it would have the opposite effects.

“Productivity in recent decades has been growing more slowly than in the past for reasons that economists do not fully understand. The labor force is also growing slowly as baby boomers retire. Restricting immigration would reinforce both trends,” the opinion article by the newspaper’s Editorial Board said.