The state Senate on Wednesday backed a bill that is meant to prohibit 3-D printed guns in New York.

The measure, which passed 51-5, includes the manufacturing of a shotgun, handgun or rifle through a 3-D printing device.

We’ve seen criminals and non-criminals alike trying to circumvent the existing regulations in New York state by literally just printing guns,” said Senator James Skoufis.

The bill is meant to stop the downloading of blueprints for building guns off the internet. The gun can then be built with the use of 3D printer technology. Law enforcement and gun control advocates alike have raised concerns that 3D guns could elude metal detectors or other scanning devices like X-rays.

“Technology is changing,” said Senator Mike Gianaris. “The world is evolving and we have to keep the laws on pace with the way the world is functioning.”

Democrats in the state Legislature earlier this year approved the so-called red flag legislation, which is meant to keep guns away from those deemed to be a danger to themselves or others. Senator Gianaris said the 3D guns, also known as ghost guns, present a more complicated policy question.

“Now we’re dealing with a problem created by advancing technology where the firearms are able to be produced in a way we’re not accustomed to and can defy some of the regulations that are in place,” said Gianaris.

The Senate had initially planned to pass the bill earlier this year, but pulled the bill because it was written too broadly and could have captured traditional firearms with plastic parts. Senator Robert Ortt, a Republican, it’s a complicated issue.

“The language is important because if you’re trying to keep certain things away from criminals or away from sensitive areas, I understand that,” said Ortt. “I want to make sure they can’t be used in a way to go beyond that and infringe on peoples’ constitutional rights in a way that the bill’s sponsors don’t intend to.”

In the Assembly, Democrats there have advanced the bill so it could be voted on in the coming weeks.