FILE - In this Jan. 13, 2015, file photo, two sailors stand with a gun as the USS John Stennis aircraft carrier leaves Naval Base Kitsap in Washington state. A federal judge in Seattle ruled Thursday, Feb. 27, 2020, that President Donald Trump cannot divert $89 million intended for a construction project at the base to help build his wall on the U.S.-Mexico border. (AP Photo/Ted S. Warren, File)

FILE - In this Jan. 13, 2015, file photo, two sailors stand with a gun as the USS John Stennis aircraft carrier leaves Naval Base Kitsap in Washington state. A federal judge in Seattle ruled Thursday, Feb. 27, 2020, that President Donald Trump cannot divert $89 million intended for a construction project at the base to help build his wall on the U.S.-Mexico border. (AP Photo/Ted S. Warren, File)

SEATTLE (AP) — President Donald Trump may not divert $89 million intended for a military construction project in Washington state to build his border wall, a U.S. judge in Seattle ruled Thursday.

The U.S. Supreme Court and some other courts have said the administration can begin diverting billions of dollars in military spending to the wall, and work has been done on some sections.

But U.S. District Judge Barbara Rothstein ruled Thursday that a case brought by Washington Attorney General Bob Ferguson contains different issues which are not covered by those decisions.

Rothstein found that diverting the money is unlawful because Congress — which has the power of the purse under the Constitution — specifically barred Trump from spending additional money on the wall. The decision was also unlawful because it would take money that Congress appropriated for military construction and use it for domestic law enforcement, she said.

ADVERTISEMENT

“Congress repeatedly and deliberately declined to appropriate the full funds the President requested for a border wall along the southern border of the United States,” Rothstein wrote.

While Trump long insisted that Mexico would pay for the wall, that hasn’t been the case. Congress in late 2018 and early 2019 refused to give Trump all of the money he wanted for a border wall, leading to a 35-day partial government shutdown. Lawmakers eventually gave him $1.4 billion.

In reaction, Trump declared a national emergency. The administration claimed that allowed him to shift almost three times that much money — $3.6 billion — from military accounts to build a combined 175 miles of fencing in California, Arizona, Texas and New Mexico.

The U.S. Supreme Court last summer lifted a court order that prevented the government from spending $2.5 billion from the Defense Department’s money for military pensions and anti-drug efforts. But legal challenges continue with regard to that money as well as the $3.6 billion the Pentagon is diverting from military construction projects.

The $89 million was intended for a pier at Naval Base Kitsap, the base west of Seattle where the Pacific fleet of nuclear submarines is based.

The Washington attorney general said losing that construction money would cost the state $2.6 million in tax revenue over the next two years, and that was enough to give Washington standing to challenge the administration’s plans in court. The judge agreed.

“This judgment is an important victory for the rule of law, and the system of checks and balances our founders enshrined in our Constitution,” Ferguson said in a written statement. “We’re looking forward to this $89 million being used the way Congress intended — to support a military construction project in Washington state.”