(CNN) - The Senate voted unanimously Monday to renew a 10-year ban on plastic guns.
Those weapons cannot be picked up by metal detectors in airports, court houses and government buildings.
Plastic guns made using 3D printers comply with the law by inserting a removable metal block.
Senators rejected a proposal by New York Democrat Charles Schumer that would have required them to include a substantial metal part that can't be easily removed.
The law was set to expire at the end of the day.
The house approved the measure last week. It now goes to President Barack Obama for his signature.