A Texas man was sentenced to eight years in federal prison Wednesday after being found with a gun, partially made from a 3-D printer, and a "hit list" of U.S. lawmakers, prosecutors said.

Eric Gerard McGinnis, 43, was arrested in July 2017 after firing three shots in a wooded area north of Dallas with an AR-15-style rifle, which he had partially made using the advanced technology. At the time, he was under a court order prohibiting him from possessing any firearms, which was put into place after a violent altercation with his girlfriend, the New York Times reports.

McGinnis was charged with possession of an unregistered firearm and possession of ammunition by a prohibited person, and was later convicted by a jury of both charges.

SUSPECT CHARGED WITH MURDER IN NYPD FRIENDLY FIRE DEATH

McGinnis' case turned more bizarre when prosecutors revealed that he created a list titled "9/11/2011 list of American Terrorists," which contained the names and addresses of a number of prominent Democratic and Republican lawmakers. Police discovered the list in his backpack when they arrested him for firing the three shots in Dallas, at which time he claimed to work for the C.I.A. Officials have decided against revealing the names of the lawmakers on the list.

McGinnis was reportedly inspired by the shooting a month before his arrest, in Alexandria, Virginia, which left House Representative Steve Scalise gravely injured and several other lawmakers hurt. The gunman, James. T. Hodgkinson, opened fire on the Republican congressional baseball team in an apparent response to President Trump's election.

McGinnis' choice to use a 3-D printer appeared to be a direct attempt to circumvent the court order prohibiting him from buying an actual weapon. He used the printer to create a working "lower receiver" for the rifle, which is the gun's firing mechanism. He then obtained the gun's other parts, including a barrel, stock and grip, through other means.

FBI: MOST WANTED LIST SUSPECT IS BELIEVED KILLED BY OFFICERS

“I didn’t buy a gun, I built the gun,” Mr. McGinnis reportedly told family members in a recorded phone call “I printed a lower, and I built it — installed the trigger and did all that stuff.”

United States Attorney Erin Nealy Cox said McGinnis' arrest should serve as a warning.

CLICK HERE FOR THE FOX NEWS APP

“When he realized he couldn’t legally purchase a firearm, Eric McGinnis circumvented our gun laws by 3-D printing his weapon, eliminating the need for a background check,” she said in a statement. “This case should send a message to prohibited persons contemplating acquiring guns by any method.”