The 9th U.S. Circuit Court of Appeals ruled in a 2-1 decision Friday that President Donald Trump’s 2019 order to reprogram $2.5 billion in military funds for wall construction on the U.S.-Mexico border was unlawful.

Chief Judge Sidney R. Thomas wrote the ruling opinion, issued Friday in the case of Sierra Club v. Donald Trump. In the opinion, Thomas ruled that the transfer of funds was not lawful because the wall did not constitute a sufficient military project, based on Section 8005 of the Department of Defense Appropriations Act of 2019.

“Section 8005 provides DoD with limited authority to transfer funds between different appropriations accounts, but it provides no such authority ‘unless for higher priority items, based on unforeseen military requirements,’” Thomas wrote. “. . . We hold that Section 8005 did not authorize the transfer of funds at issue here because ‘the border wall was not an unforeseen military requirement.’”

The majority opinion further argues the federal government lacked proof that wall construction could serve its stated purpose in blocking the flow of drugs across the southern border.

“Although they allege that the injunction ‘frustrates the government’s ability to stop the flow of drugs across the border,’ unlike the government in [Winter v. NRDC], the Federal Defendants have failed to demonstrate that construction of the border wall would serve this purpose, or alternatively, that an injunction would inhibit this purpose,” the opinion said. “The Federal Defendants cite drug trafficking statistics, but fail to address how the construction of additional physical barriers would further the interdiction of drugs.”

The majority opinion concluded, affirming a lower court’s decision granting the Sierra Club’s request to file claims against the wall construction effort.

Circuit Judge Daniel P. Collins wrote the panel’s dissenting opinion.

“I agree that at least the Sierra Club has established Article III standing, but in my view the Organizations lack any cause of action to challenge the transfers,” Collins wrote. “And even assuming that they had a cause of action, I conclude that the transfers were lawful.”