A state House committee voted overwhelmingly Friday for a bill to prevent state officials from helping to enforce any federal gun-control legislation passed in the wake of the Connecticut school massacre.

Proposed by Del. Robert G. Marshall (R-Prince William), the bill cleared a House subcommittee earlier in the week and passed the Committee on Militia, Police and Public Safety Friday — a day when Vice President Biden and two Cabinet members were in Richmond, holding a discussion on gun safety issues at Virginia Commonwealth University.

The bill now moves to the House floor.

Marshall said the measure is meant to protect gun owners from efforts to tighten gun laws in response to the Sandy Hook Elementary School shooting that occurred shortly before Christmas.

The bill would “Prevent any agency, political subdivision, or employee of Virginia from assisting the Federal government of the United States in any investigation, prosecution, detention, arrest, search, or seizure, under the authority of any federal statute enacted, or Executive Order or regulation issued, after December 31, 2012, infringing the individual Right to Keep and Bear Arms by imposing new restrictions on private ownership or private transfer of firearms, firearm magazines, ammunition, or components thereof,” according to the measure’s official summary.

“This is really an assault on second amendment rights and it has nothing to do with gun safety,” Marshall said of federal legislation.

Del. Scott A. Surovell (D-Fairfax) called the passage “dumbfounding.”

“The feds are going around trying to get these things off the streets and you have the Virginia legislature thumbing its nose,” he said. “I don’t know what it’s gonna take for this body to get realistic about military-style weapons or background checks.”