(CN) – Trump administration rules that would have made it easier to pass blueprints for untraceable “ghost guns” online did not take effect Monday, thanks to a preliminary injunction from a federal judge who said the federal rules could impair states’ ability to prevent terrorist threats, assassinations and other violence.

Under the Obama administration, the federal government fought against the sharing of files used to create 3D-printed guns. At issue is whether the guns and the plans with which anyone can make them – regardless of technical expertise – should be removed from the U.S. Munitions List. That would mean scrapping the requirement that anyone who wants to export them online must first get a license from the Department of State.

But the Trump administration reversed course in 2018 as part of a settlement with Defense Distributed, which claimed such licensing requirements violated its free speech by keeping it from posting blueprints online to allow anyone to make 3D-printed guns. The federal government agreed to remove the blueprints from the list and to allow their public release. Then the State Department proposed a rule that would allow the Department of Commerce to regulate international export of the technical plans – in spite of the State Department’s own conclusion that international publication of such plans was a threat to world peace, would jeopardize U.S. security interests and would seriously harm the country’s foreign policy goals.

Eight states sued and U.S. District Judge Robert Lasnik of the Western District of Washington found in November 2019 that the government’s decision to remove 3D-printed weapons from its munitions list was illegal and wasn’t based on adequate analysis.

Undeterred, the government published new rules two months later, removing from the munitions list “all non-automatic firearms up to .50 caliber” and “related technical information.” The rules also handed regulatory jurisdiction to the Department of Commerce of files “for the production of a firearm, or a firearm frame or receiver” … “made available by posting on the internet or in electronic format” that are “ready for insertion” in a 3-D printer.

This time, 17 states sued, claiming the rules “amount to a toothless prohibition on 3-D gun files that will lead to their widespread proliferation.”

The rules were set to take effect Monday, but U.S. District Judge Richard A. Jones issued a preliminary injunction pending the outcome of a lawsuit led by the state of Washington. Jones found the government failed to adequately notify the public about the proposed changes, that it didn’t follow its own basic procedures in changing such an important rule and that it didn’t show why it was changing the rules to prevent 3D-printed guns from being falling under the International Traffic in Arms Regulations.

“Again, the record evidence fails to explain the deviation from the State Department’s prior determination that controlling certain 3-D gun files under ITAR was necessary to further world peace and national security,” Jones wrote.

The federal government argued the states were merely quibbling over the specific weapons on the Munitions List – a policy decision that falls under the discretion of Congress and the president. But Judge Jones swatted that claim away, writing that the states were instead challenging whether the government had followed the Administrative Procedure Act in making changes to the list.

“This is neither a political question nor one committed to the agency’s discretion,” Jones wrote, quoting the prior decision.

New York Attorney General Letitia James, one of the plaintiffs in the case celebrated the win with a tweet.

“We will continue to work to stop the Trump Admin from further facilitating the spread of gun violence across this nation,” James wrote.

U.S. Attorney Eric Soskin, who defended the government in court, declined to comment. The spokeswoman he suggested did not respond to a request for comment.

Jones issued an injunction stopping the rules from taking effect until the litigation is resolved, writing that the balance “tips sharply in the states’ favor.”

“The court must acknowledge the grave reality that is likely to occur without injunctive relief,” Jones wrote. “As the agency’s specific findings in the record show, the proliferation of 3-D gun files on the internet likely renders ineffective arms embargoes, export controls, and other measures used to restrict the availability of uniquely dangerous weapons sought by those seeking to commit acts of terrorism or other serious crime — implicates serious national security and public interests.”