(CNN) A federal judge in Washington state on Thursday blocked the Trump administration from diverting millions of dollars in funding from a project at a base in the state to border wall construction, delivering a partial blow to President Donald Trump.

The lawsuit relates to Trump's national emergency declaration, which allowed the administration to dip into Pentagon funds, including redirecting money intended for military construction projects to the wall.

A slew of states and organizations have sued the administration over the declaration. Thursday's ruling is specific to one of the projects targeted to have its funds redirected.

The construction project at the center of the lawsuit is at the Naval Submarine Base Bangor, otherwise known as the Bangor Project. The Defense Department identified the project, along with more than 100 others, to shore up funds for 11 border barrier projects.

Bangor, according to the judge's ruling, is "home to the United States Pacific Fleet of Trident Ballistic Missile Submarines, nuclear powered submarines that carry nuclear warheads."

Read More