A federal appeals court says US President Donald Trump was wrong to divert $US2.5 billion ($A3.6 billion) meant for the Pentagon to build part of his long-sought wall along the US-Mexico border.
In a pair of 2-1 decisions, the 9th US Circuit Court of Appeals on Friday said the White House lacked constitutional authority for the transfer, noting that Congress had denied the funding and finding no "unforeseen military requirement" to justify it.
The court also said California and New Mexico, which share a border with Mexico and were among 20 states suing the government, had legal standing to sue.
Chief Judge Sidney Thomas said "the Executive Branch's failure to show, in concrete terms, that the public interest favors a border wall is particularly significant given that Congress determined fencing to be a lower budgetary priority and the Department of Justice's own data points to a contrary conclusion".
Trump had declared a national emergency at the border in February 2019 to access the funds.
A Justice Department spokeswoman declined to comment.
California Attorney General Xavier Becerra praised the San Francisco-based court for halting Trump's "unlawful money grab", saying taxpayers deserve to know their money goes where Congress intends.
US House Speaker Nancy Pelosi called the decisions "a great victory for the rule of law", saying Trump undermined military readiness to fulfill his "outrageous campaign promise" to build a wall.
The appeals court also ruled that the Sierra Club and Southern Border Communities Coalition could sue over the diversion and deserved an injunction.
That ruling may be symbolic because the US Supreme Court said last July the non-profits likely had no legal right to sue.
The Supreme Court also let the $US2.5 billion ($A3.6 billion) be spent while litigation continued, blunting the likely impact of Friday's decisions.
Australian Associated Press