A federal judge in Seattle, Washington has ruled illegal the Trump administration's decision last year to allow a Texas company to post blueprints online for 3D-printed guns. Judge Robert Lasnik of the U.S. District Court in Seattle said in his ruling that the administration violated federal law with its July 2018 decision for failing to notify Congress in advance, and failing to provide a "reasoned explanation" of the change in previous policy.

In July 2018 the State Department reversed an earlier decision, made under the Obama administration, to ban posting of the gun blueprints. The Obama State Department had deemed the blueprints to be in violation of federal export laws, as they were downloaded by people outside the U.S. Soon after the Trump State Department changed tack on that, 19 states and Washington D.C. sued the Trump administration to block the reversal and keep the free gun blueprints off the internet.

It was Judge Lasnik who issued a restraining order in the summer of 2018 to ban the continued free online distribution of the instructions to print the difficult to detect, untraceable guns.

Get Breaking News Delivered to Your Inbox

But Cody Wilson, a gun rights campaigner and owner of Defense Distributed, the Texas company that publishes the blueprints, has used a loophole since that order to keep distributing his computer-aided design (CAD) gun plans — albeit in a more limited manner.

Lasnik's restraining order barred the free publication of the blueprints, temporarily blocking the State Department's move to allow the online postings, but Wilson was still allowed to sell the files to U.S. residents individually, and he told CBS News he had continued to do so as "a matter of principle."

In his decision issued Tuesday, Lasnik noted the State Deparment's "prior position regarding the need to regulate 3D-printed firearms and the CAD files used to manufacture them" and said federal law required the administration to "do more than simply announce a contrary position."

He said in lieu of a clear explanation of its change in opinion, the decision by the Trump State Department represented an "arbitrary and capricious" violation of the federal Administrative Procedure Act.

On Wednesday morning, Attorney General Letitia James of New York, one of the states that sued to overturn the State Department's decision, released a statement calling Judge Lasnik's ruling "a vindication of sound decision-making on matters that would have a profound impact on public safety."

"Without question, the release of step-by-step instructions for the production of untraceable and undetectable firearms would threaten the safety of not only our nation's residents, but people around the globe. The court ultimately found the Trump Administration acted arbitrarily and capriciously when it determined to move forward with such a plan, and we completely agree," she said.

The lawsuit filed by New York and other states that resulted in Lasnik's ruling argued that the printed guns represent a clear threat to law enforcement officers as they can be produced in private, avoiding licensing and security checks, and by default they cannot be traced.

There was no immediate reaction from the U.S. Justice Department to the Tuesday ruling. The New York Times quoted a State Department official as saying Lasnik's ruling was still being studied.

Wilson and Defense Distrbuted have argued that printing the gun blueprints online falls within 1st Amendment-protected free speech. A lawyer for the company told the New York Times that it would "be appealing and fully expects a swift reversal" of Lasnik's ruling.

"With today's unprecedented ruling, a few rogue state officials have commandeered the State Department to do their unconstitutional bidding nationwide," Chad Flores, a lawyer for the Austin, Texas-based company, told the New York Times.