A U.S. appeals court on Friday backed a lower court's decision that bars President Donald Trump from shifting military funds to pay for a wall on the U.S.-Mexico border. 

The legal challenge to the funding plan had been filed by New York Attorney General Letitia James as part of a coalition of state attorneys general opposing the move. 

“The courts have again flatly rejected President Trump’s illegal attempt to divert critical military spending to a wasteful border wall," James said in a statement. "We are grateful that this manufactured national emergency and the illegal maneuvers employed to pay for it have been blocked for 2019. But we know the president continues to push to subsidize this project year-after-year. The president’s abuse of power will not stand, so we will continue to fight it using every tool at our disposal.”

Trump last year sought to spend $1.6 billion in federal military funds for the border wall, the building of which is a key camaign pledge of his from 2016. A U.S. District Court in California previously ruled against Trump over the lawsuit challenging the legality. 

The funding diversion has real-world effects. The U.S. Military Academy at West Point in New York, for example, could lose $160 million for two major projects.