A Virginia bill that would have allowed the government to shield the names of police officers from the public was killed by a legislative committee Thursday after a fierce debate that pitted open records advocates against law-enforcement groups.

The measure was introduced in response to a court ruling last year that directed the state to turn over the names and employment dates of thousands of law enforcement officials to The Virginian-Pilot, which is trying to determine whether officers who get fired are landing jobs at another agency.

Supporters of the bill said the release and publication of names could put officers in danger at a time of heightened tension between law enforcement and the public. But opponents said the measure went too far and would prevent the public from shining a light on inappropriate behavior.

"This is a check on patronage abuses. It's a check on favoritism. It's a check on discrimination against people who are in protected classes," Craig Merritt, who represented the Virginia Press Association, said of the public's ability to obtain officers' names through Freedom of Information Act requests.

Republican Sen. John Cosgrove's bill, which would have exempted the names and training records of officers from FOIA, passed the GOP-controlled Senate with a 25-15 vote earlier this month.

But a House subcommittee voted unanimously to table the bill Thursday, effectively killing the measure for the year. Lawmakers on the panel said they agreed that officers' safety is a top priority but don't believe making their names secret is necessary.

"I don't see in my mind having the individuals' name out there as being a threat," Republican Del. Joseph Yost said.

Several states have or are examining laws aimed at preventing the release of the names of officers involved in shootings. But Dan Bevarly, interim executive director of the National Freedom of Information Coalition, has said he's unaware of another state that would allow agencies to make secret the names of all officers under any circumstance.

Law enforcement groups accused opponents of mischaracterizing the bill as creating a "secret police" force and rejected concerns that it would allow agencies to shield the names of officers on arrest warrants or traffic summons.

Supporters acknowledged that the measure was a bold step, but said they believed it's vital to ensure to ensure officers' safety.

"When you put the officer's name out there on the Internet now -- with the ability that people have to find people -- they're going to find out where they live and they're going to have the opportunity to kill them and do other bad things to their family," said Kevin Carroll, president of the Virginia chapter of the Fraternal Order of Police. "All I'm trying to do ... is protect my people."