Blueprints outlining how to 3D print a gun can go back online, the US Justice Department has ruled.
It follows a four-year battle between the makers of the gun, Defense Distributed, and the US State Department.
The first printed firearm was made in 2013. Files showing how to replicate the process were then put online and downloaded more than 100,000 times.
The US government ordered them to be removed shortly afterwards.
It argued that the files violated the International Traffic in Arms Regulation, which governs what military materials can be exported.
Defense Distributed joined forces with the Second Amendment Foundation (SAF) – set up in 1974 to defend the right to own guns – to sue the State Department over the clampdown.
The US Justice Department has now said that Americans may “access, discuss, use and reproduce” the technical data.
The government has also agreed to return $10,000 (£7,600) in State Department registration dues paid by Defense Distributed. It will also pay the organisation’s legal fees.
“Not only is this a First Amendment victory for free speech, it also is a devastating blow to the gun prohibition lobby,” said SAF founder Alan M Gottlieb.
“For years, anti-gunners have contended that modern semi-automatic sport-utility rifles are so-called ‘weapons of war’ and with this settlement, the government has acknowledged they are nothing of the sort.”
The CAD (computer-aided design) files would go back online on 1 August, said Defense Distributed on its website, which also announced: “The age of the downloadable gun formally begins.”
Critics argue that the decision will result in a rise in so-called ghost guns – unregistered weapons created without government knowledge.
Defense Distributed founder Cody Wilson debuted the world’s first 3D printed working handgun – known as The Liberator – in 2013.
Since then the guns have rapidly grown in sophistication as materials have become cheaper and better and software more advanced.
Also available on its website is a $250 milling device – known as Ghost Gunner – that can turn parts easily purchased online into a fully working gun.