(CNN) — Gun-rights activists have reached a settlement with the government that will allow them to post 3-D printable gun plans online starting August 1.

The settlement ends a multi-year legal battle that started when Cody Wilson, who describes himself as a post-left anarchist, posted plans for a 3-D printed handgun he called “The Liberator” in 2013.

The single-shot pistol was made almost entirely out of of ABS plastic — the same stuff they make Lego bricks out of — that could be made on a 3-D printer. The only metal parts were the firing pin and a piece of metal included to comply with the Undetectable Firearms Act.

The US State Department told Wilson and his non-profit group Defense Distributed to take down the plans. It said the plans could violate International Traffic in Arms Regulations (ITAR), which regulate the export of defense materials, services and technical data.

In essence, officials said someone in another country — a country the US doesn’t sell weapons to — could download the material and make their own gun.

Wilson complied, but said the files already had been downloaded a million times.

He sued the federal government in 2015.

U.S. requires group to remove 3D gun instructions from its website

WHAT OTHERS ARE CLICKING ON:

>>MORE STORIES