(CNN) - The Senate voted unanimously on Monday to renew a 10-year ban on guns that cannot be picked up by metal detectors commonly found in airports, court houses and government buildings.
The law, which prohibits firearms made mostly of plastic, was set to expire at day's end.
It had drawn renewed attention recently due to its pending expiration and the advent of mainly non-metalic handguns produced by 3-D printers.
The House acted last week, and now the measure goes to President Barack Obama for his signature.
A White House official said the President is expected to sign the legislation.
But the Obama administration and congressional Democrats had been pushing for an extension to also deal with potential loopholes for 3-D-printer guns, which the congressional legislation does not do.
Currently, plastic guns made using 3-D printers comply with the law by inserting a removable metal block. That has led to worries plastic guns could pass through metal detectors without being flagged by simply removing the block.
Prior to Senate renewal of the legislation, the chamber rejected a proposal by New York Democrat Charles Schumer that would have required any plastic gun to include a substantial metal part that can't be easily removed.
CNN's Evan Perez contributed to this report.