Appeals court sides with Chicago against Trump sanctuary city policy Attorney General Sessions tied grant funds to compliance with three conditions.

A federal appeals court upheld a nationwide injunction that blocked the Trump administration from linking a federal grant program to cooperation with immigration enforcement Thursday.

The program, known as the Byrne JAG grant, is the “primary provider” of federal criminal justice funding to state and local governments, according to the court. Attorney General Jeff Sessions had tied the funds to grant recipient’s compliance with three conditions.

"From now on, the department will only provide Byrne JAG grants to cities and states that comply with federal law, allow federal immigration access to detention facilities and provide 48 hours notice before they release an illegal alien wanted by federal authorities," Sessions wrote in a July statement.

The City of Chicago argued that it was “unlawful and unconstitutional.”

A lower court agreed to two of the three conditions, issuing a nationwide injunction. The appellate court upheld that decision Thursday.

“The attorney general in this case used the sword of federal funding to conscript state and local authorities to aid in federal civil immigration enforcement," the court wrote in its opinion. "But the power of the purse rests with Congress, which authorized the federal funds at issue and did not impose any immigration enforcement conditions on the receipt of such funds."

A DOJ spokesman, however, said that the department acted with proper authority.

“The Justice Department believes it exercised its authority, given by Congress, to attach conditions to Byrne JAG grants that promote cooperation with federal immigration authorities when the jurisdiction has an illegal alien who has committed a crime in their custody,” said DOJ spokesman Devin O’Malley.

John Cohen, an ABC News consultant and former acting Homeland Security undersecretary, said that he has seen no lack of cooperation from state and local law enforcement officials in his experience.

"In speaking with law enforcement officials across the nation, I have found none that are unwilling to work with ICE and CBP to locate, arrest and detain those undocumented or unauthorized immigrants involved in criminal activity," Cohen said.

The court went on to lay out the “sometimes-clashing interests” between federal law enforcement and local government. In this case, Chicago determined that people unlawfully in the U.S. might avoid contacting local police to report crimes if they fear it will bring the scrutiny of the federal immigration authorities.

Cohen said that the administration has overstated the threat of illegal immigration.

"While demonizing state and local officials and embellishing the threat posed by illegal immigrants may further the president’s political agenda, it is undermining the very operational relationships that are vital to protecting our communities from violence," Cohen said.

In its decision, the court wrote that its role in this case was not to assess the “optimal immigration policies for our country," but rather to protect one of its "bedrock principles," the separation of powers.