A federal appeals court ruled in favor of President Trump's administration in a case involving federal dollars being withheld from cities based in part on their "sanctuary city" status.

The 2-1 opinion from a panel on the 9th Circuit Court of Appeals overturned a nationwide injunction issued by a federal judge, who sided the city of Los Angeles in its lawsuit over Community Oriented Policing Services grants, which are determined by a point system that takes into account whether the city applying is a sanctuary city.

The Trump administration found Los Angeles did not qualify for the grant because it failed to receive enough points under 2017 rules put in place by then-Attorney General Jeff Sessions, which gave cities extra points for cooperating with the federal immigration officials with illegal immigrants who have been detained in city jails.

"Cooperation relating to enforcement of federal immigration law is in pursuit of the general welfare, and meets the low bar of being germane to the federal interest in providing the funding to 'address crime and disorder problems, and otherwise ... enhance public safety,'" Sandra Ikuta, one of the two judges in the majority, wrote. "DOJ has reasonably determined that cooperation on illegal immigration matters furthers the purposes of the Act."

The Justice Department praised the decision.

“The Department is pleased that the Court recognized the lawful authority of the Administration to provide favorable treatment when awarding discretionary law-enforcement grants to jurisdictions that assist in enforcing federal immigration laws,” the Justice Department said in a statement.