RICHMOND, Va. (WRIC) — Virginia senators passed two bills nearly along party lines that impose new restrictions on guns, but neither is likely to make it through the Republican-led House of Delegates.

The state Senate voted 22-17 along party lines to ban the sale of so-called ghost guns — homemade firearms without serial numbers typically assembled using 3D printers — or the components used to build one.

The measure makes it a Class 1 misdemeanor, which carries up to a year in jail and a $2,500 fine, for those knowingly selling or offering to sell, transfer or buy them unless they are a federal firearms importer, dealer or manufacturer.

There is also an exception if “the unfinished frame or receiver is required by federal law to be, and has been, imprinted with a serial number by a federal firearms importer, manufacturer, or dealer.”

Violators charged with any subsequent offense could face a Class 4 felony charge — which carries up to a 10-year sentence and a $100,000 fine.

The 40-member chamber then passed a bill to prohibit people from carrying certain assault weapons in public on a 21-18 vote, with state Sen. Lynwood W. Lewis Jr. (D-Accomack) siding with Republicans in opposition.

The legislation would ban certain semi-automatic center-fire rifles, pistols, and shotguns in public spaces, including streets, sidewalks and parks. Under Virginia law, the ban on guns in public spaces is only in certain localities and applies to certain loaded guns.

The bill would apply to firearms that are unloaded and expand the group of semi-automatic center-fire rifles, pistols and shotguns banned in public.

Among other criteria, the proposal would remove the requirement that the banned weapon have a magazine capable of holding more than 20 rounds of ammunition or designed to include a silencer or “equipped with a folding stock.”

The bills, which are part of Virginia Democrats’ legislative agenda to add gun restrictions, were both introduced by state Sen. Adam Ebbin (D-Alexandria).

“There are too many loopholes that allow for dangerous individuals to acquire guns,” Ebbin said in a statement. “My bill that passed today addressing the sale of unserialized firearms or ‘ghost guns’ will help ensure firearms won’t get in the hands of criminals and dangerous individuals.”

The measures will now go to the Republican-controlled Virginia House, where GOP lawmakers have already used their majority to defeat gun bills proposed by Democrats.