The Virginia General Assembly on Thursday passed legislation that would seal the records of all concealed handgun permits, handing a victory to gun owners who said the measure would ensure their privacy and perhaps their safety from criminals who might use such information to target them.

“We’ve been wanting this for years,” said Philip Van Cleave, president of the Virginia Citizens Defense League. “It wasn’t as much about guns as it was about privacy.”

The bill – which began in the evenly divided Senate as a measure that would shield only the identities of permit holders who also had protective orders – was later amended in the GOP-led House to prohibit disclosure of information on anyone with a concealed handgun permit.

The House’s version carried by a 76 to 23 vote. On Thursday, the Senate passed the amended bill by a vote of 31 to 9. It now heads to the governor’s desk.

“That really upsets me,” said Andrew Goddard, president of the Virginia Center for Public Safety. Goddard, whose son was injured in the mass shooting at Virginia Tech in 2007, said he believed the measure was intended to prevent embarrassment for gun-rights supporters whenever concealed handgun permit holders commit crimes.

Goddard cited the case of Christopher B. Speight, who held a court-issued concealed weapons permit. Speight, 42, killed eight people at his home in Appomattox in January 2010, including his sister, her husband, and the couple’s two children and four neighbors, authorities said. He is still awaiting trial.

“The real reason they want this is because when somebody does something – like Speight in Virginia – that’s a smack in the eye for the concealed carry movement,” Goddard said Thursday.

Others argued that such government-regulated permits should be open to public scrutiny. The Virginia Coalition for Open Government supported the original bill but spoke out against enacting a blanket prohibition on disclosure for all permit holders.

But gun-rights advocates framed the issue as a question of their privacy and public safety. They renewed their push to seal permit records after a New York newspaper, following the mass killings at an elementary school in Newtown, Conn., published an online map with information about the permit holders.

At least one firearms-related burglary was linked to the disclosure. Van Cleave said that similar problems occurred in Virginia after the Roanoke Times and other newspapers published the names of permit holders, including the time a former prison inmate showed up at the home of a correctional officer.

Sen. Mark D. Obenshain (R-Harrisonburg), who sponsored the bill, said that once a person meets the statutory requirements for a handgun permit, they have a right to keep that information private.

“It’s much like a driver’s license or a Social Security card,” Obenshain said.