President Trump notched a win on Friday in a federal appeals court, which upheld a Department of Justice method for cracking down on sanctuary cities.

In a 2-1 decision that overturns a nationwide injunction, the DOJ is now allowed to give preferential treatment for community policing grants to cities that don't defy federal immigration enforcement.

"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 DOJ said in a statement.

DHS LEADING INTERNAL INVESTIGATION INTO RAID LEAKS

While the Trump administration has faced numerous obstacles in cutting funding to sanctuary cities, the 9th Circuit Court of Appeals appears to make an exception for the Community Oriented Policing Services (COPS) grant program, which is meant to help cities hire more police officers.

Other factors in the program's "points" system include the hiring of veterans, and the occurrence of school shootings within a jurisdiction. In 2017, the DOJ under then-Attorney General Jeff Sessions implemented points that benefit non-sanctuary cities.

Judges Sandra Ikuta and Jay Bybee, who ruled in the DOJ's favor, were appointees of President George W. Bush.

CLICK HERE TO GET THE FOX NEWS APP

"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,'" Ikuta stated.