A federal appeals court held Wednesday that the Trump administration can withhold millions of dollars in grants to states that set up Sanctuary Cities and refuse to work with federal immigration authorities.

The Associated Press reported that the 2nd U.S. Circuit Court of Appeals in Manhattan made the ruling Wednesday morning, overturning a lower court decision that said the federal government had to release law enforcement grants to states that refused to cooperate with the federal government when it came to criminal illegal immigrants. The administration previously had refused to release the funding to seven states and New York City over their Sanctuary City policies. The affected states are Connecticut, Massachusetts, New Jersey, New York, Rhode Island, Virginia, and Washington.

“The states and city sued the U.S. government after the Justice Department announced in 2017 that it would withhold grant money from cities and states until they gave federal immigration authorities access to jails and provide advance notice when someone in the country illegally is about to be released,” the AP reported. “Before the change, cities and states seeking grant money were required only to show they were not preventing local law enforcement from communicating with federal authorities about the immigration status of people who were detained.”

As evidence has shown, cities and states have actively prevented local law enforcement from communicating with federal authorities about criminal illegal aliens. As The Daily Wire previously reported, U.S. Immigration Customs and Enforcement (ICE) arrested hundreds of criminal illegal aliens in September 2019, even as states across the country refused to inform them when criminals were being released from prison due to sanctuary city policies. In March 2019, ICE officials arrested more than 20 illegal immigrants after they were released from New York prisons without notifying federal authorities. In Illinois, Cook County ignored more than 1,000 ICE detainers in fiscal year 2019, allowing criminals back onto the streets to harm more U.S. citizens.

As the AP reported, three other federal appeals courts, representing additional states, ruled differently when it comes to federal grants and sanctuary cities.

“In the past two years, federal appeals courts in Chicago, Philadelphia and San Francisco have ruled against the federal government by upholding lower-court injunctions placed on the enforcement of some or all of the challenged conditions,” the AP reported.

The 2nd Circuit, however, stated that relevant laws give the U.S. Attorney General authority to impose conditions on those receiving federal grants. Further, the court stated the U.S. Supreme Court had ruled favorably for the federal government to exercise its powers over states regarding immigration enforcement.

The grant program in question is known as the Edward Byrne Memorial Justice Assistance Grant Program, which was named after a 22-year-old New York City police officer who was shot to death “while guarding the home of a Guyanese immigrant cooperating with authorities investigating drug trafficking,” the AP reported. The grant was created in 2006 and provides more than $250 million in federal funding to state and local law enforcement agencies throughout the country.