A US federal judge in Seattle has blocked the release of software that allows consumers to 3D-print firearms.

Gun access advocacy group Defense Distributed published downloadable gun blueprints five days early on Friday.

The firm had reached a settlement with the Trump administration in June to allow it to legally publish the plans.

But eight states and the District of Columbia sued the government on Monday to block the settlement, arguing the untraceable guns were a safety risk.

US District Judge Robert Lasnik issued a temporary restraining order halting the release hours before the 1 August deadline, saying the blueprints could fall into the wrong hands.

“There are 3D printers in public colleges and public spaces and there is the likelihood of potential irreparable harm,” he said.

Judge Lasnik scheduled another hearing for 10 August.

Although Defense Distributed had been expected to publish the blueprints on Wednesday, it uploaded files for nine types of gun to its website last week. Between Friday and Sunday, more than 1000 people downloaded the files for building an AR-15 rifle – the same gun used in many of America’s mass shootings.