(CNN) The Trump administration can withhold federal money from seven states, as well as New York City, over their cooperation on immigration enforcement, a federal appeals court ruled Wednesday.

The federal appeals court ruling comes amid an ongoing feud between the Trump administration and so-called "sanctuary cities," which limit cooperation between local law enforcement and federal immigration authorities. Over recent weeks, the administration has stepped up its fight against sanctuary jurisdictions and taken measures like barring New York residents from enrolling in certain Trusted Traveler programs , such as Global Entry.

Judge Reena Raggi, writing on behalf of the unanimous 3-judge panel, acknowledged the divisive nature of the issue at hand, writing: "The case implicates several of the most divisive issues confronting our country and, consequently, filling daily news headlines: national immigration policy, the enforcement of immigration laws, the status of illegal aliens in this country, and the ability of States and localities to adopt policies on such matters contrary to, or at odds with, those of the federal government."

The city of New York is a plaintiff in the lawsuit, along with New York, Connecticut, New Jersey, Washington, Massachusetts, Virginia and Rhode Island.

Read More