Image copyright The Washington Post via Getty Images

A Dallas man has been sentenced to eight years in prison after he was found with a partially 3D-printed rifle and a hit list of US lawmakers.

Eric McGinnis was prohibited from possessing firearms for two years after he attacked his girlfriend in 2015.

McGinnis attempted to buy a gun in 2016 but failed the background check - so he instead purchased gun parts and a 3D printer to assemble his own weapon.

He was arrested in 2017 after police heard him fire shots in the woods.

McGinnis, now 43, had little more than a month left on his two-year domestic abuse firearm ban when police arrested him with the partially printed AR-15 rifle near Dallas, Texas, the US Attorney's office said in a statement on Wednesday.

When police ordered him to surrender, McGinnis tried to say that he was a member of the CIA.

Officers inspected McGinnis' backpack and discovered a hit list titled "9/11/2001 list of American Terrorists" that included the names of both Democratic and Republican federal lawmakers.

A federal jury convicted McGinnis on charges of possessing an unregistered short-barreled rifle and unlawfully possessing ammunition under a protective order last June.

The 3D-printed portion of McGinnis' weapon was not illegal, but by owning a firearm, he was in violation of the judge's order.

Prosecutors at Wednesday's sentencing also noted that an analysis of McGinnis' electronic devices showed he had a "strong interest" in James Hodgkinson, who in 2017 shot and wounded Republican Representative Steve Scalise and others during a baseball game.

In a jailhouse phone call, McGinnis admitted to a family member that he 3D-printed the mechanisms required to fire the gun.

"I didn't buy a gun, I built the gun," he said.

"When he realised he couldn't legally purchase a firearm, Eric McGinnis circumvented our gun laws by 3D-printing his weapon, eliminating the need for a background check," said US Attorney Erin Nealy Cox.

Ms Nealy Cox said McGinnis' case "should send a message to prohibited persons contemplating acquiring guns by any method".

Alcohol, Tobacco and Firearms (ATF) Bureau Special Agent Jeffrey Boshek also noted on Wednesday: "Controls to determine if an individual is prohibited from purchasing firearms and ammunition worked."

Mr Boshek instead criticised the "evolving technology" that allowed McGinnis to "manufacture an untraceable firearm with apparent ease and anonymity".

Image copyright KELLY WEST/AFP/Getty Images Image caption A man works on a 3D-gun printing machine

How does 3D-printing guns work?

Advances in 3D-printing technology have made it feasible to create gun parts using a simple set-up: a mill or plastic printer hooked up to a computer.

These guns have no serial number and are illegal to buy or sell, but making one is still legal.

In the US, most gun parts have little regulation and are not individually considered as "firearms". These parts can be shipped or sold without a federal firearms licence (FFL).

The lower receiver, a part that essentially holds the gun together and the part McGinnis admitted to printing, is considered a firearm under US law, but only if it is complete.

An 80% complete lower requires minimal effort to mill into a finished lower, but it is not considered a firearm. This finished lower can be tailored to build different guns, including AR-15s, full-sized rifles or pistols.

In August, a US federal judge in Seattle temporarily blocked the release of software blueprints for 3D-printing fully working weapons.