(Bloomberg) -- It’s a question of who’s violating the U.S. Constitution when it comes to print-at-home guns -- the federal agency accused of recklessly deregulating the weapons or the states that claim they’re a threat to public safety.

A federal judge could provide an answer any day now -- and address the balance of power between states and the federal government -- in a ruling on digital blueprints that a small gun-technology company, Defense Distributed, wants to publish online for anyone with a 3-D printer.

The Obama administration blocked the company’s publishing effort for years on the grounds that it would violate an arms-export law, but the State Department reversed course in June 2018 and gave Defense Distributed a green light. The company’s website called it "our most famous victory."

The states quickly sued, seeking to invalidate a settlement that had been negotiated quietly between the federal government and Defense Distributed. President Donald Trump publicly criticized printable guns while his administration defended the deal.

“The evidence shows that the State Department failed to consider the national security implications of deregulation in light of the unique properties of untraceable, undetectable, 3D-printable plastic firearms,” the states said.

Read More: Trump Says Guns Created on 3-D Printers Don’t ‘Make Much Sense’

The suit claims the accord violates the Tenth Amendment of the U.S. Constitution by eroding the state’s police powers. Austin, Texas-based Defense Distributed says the states are violating the First Amendment by restricting what it can publish. Both sides asked a federal judge in Seattle to rule in their favor without a trial, making their arguments in a series of court filings over the summer.

A ruling could come at any time, and appeals are likely.

Defense Distributed says the entire country is being harmed by the effort to block “digital gunsmiths” from accessing the blueprints, comparing the dispute to past state efforts to stop school desegregation or gay marriage. Making gun blueprints available online is a quintessential free-speech right, no different from speaking on a street corner or publishing a book, it says.

“Recalcitrant states want an order forcing federal officials to re-impose that unconstitutional regime on the theory that the ‘First Amendment is irrelevant,’” the company said in a June filing.

The free-speech fight was envisioned as early as 2012 by former Defense Distributed chief executive officer Cody Wilson, who recruited a team to develop “the first entirely 3-D printed pistol” dubbed the Liberator, according to the group’s website. He was eager for a fight, and compared his company to WikiLeaks.

“Wilson directed a new, free speech approach to undermining the ideological forces of American gun control,” the website says. “The Wiki Weapon Project is the philosophical and practical cornerstone of all Defense Distributed efforts.”

G.S. Hans, a professor at Vanderbilt Law School who isn’t involved in the case, said the lawsuit is complicated due to strong First Amendment principles allowing for publication of code online.

Read More: Backer of 3-D Printed Guns Replaced After Sex-Assault Arrest

The states, led by Washington, argue that under the Tenth Amendment, police power is a “critical function reserved to the states.”

The settlement “purports to allow any U.S. citizen to manufacture and use an undetectable and untraceable weapon -- regardless of their age, mental health status, or criminal history -- in violation of Washington’s public safety laws,” the states said.

The State Department is also seeking to have the suit thrown out, but the government’s filings don’t come out in support of printable guns.

“Manufacture or possession of plastic guns that are undetectable is a serious federal crime, punishable by up to five years in prison,” the agency said in the first line of a March filing with the court. “The Department of Justice, among other agencies, enforces this prohibition, and will continue to do so vigorously.“

Instead, the agency argues that the arms-export law simply doesn’t apply to blueprints marketed toward domestic users. The law is intended to block export of arms to potential enemies abroad, it says.

The lawsuit “misunderstands the nature of the Department of State’s authority,” government lawyers argued.

Free speech aside, the company argues that the suit is pointless because the files have already been downloaded millions of times during a brief period when they weren’t blocked.

“The whole world already has the files at issue, and always will,” Defense Distributed said in a filing.

To contact the reporter on this story: Erik Larson in New York at elarson4@bloomberg.net

To contact the editors responsible for this story: David Glovin at dglovin@bloomberg.net, Peter Blumberg, Peter Jeffrey

©2019 Bloomberg L.P.