Lawmakers in Virginia on Thursday evening effectively killed a bill that would have made it possible for law enforcement agencies to keep officers’ names secret, postponing a debate that was attracting national attention to the state.

Supporters say the bill would have protected police officers from people bent on harming them; opponents say it amounted to an assault on accountability and transparency at a time when police actions are being scrutinized as never before.

A House panel unanimously voted to table the bill and refer it to a council charged with studying the state’s public records law — acting on the suggestion of Del. Richard L. Anderson (R-Prince William), a retired Air Force colonel. “I want to see this get a deeper and more fair hearing because our officers merit protection,” Anderson said. “Those who wish to defend this principle of openness in a constitutional republic — that is a valid concept, too.”

The vote followed an hour of testimony from people on both sides of the issue.

The bill’s sponsor, state Sen. John A. Cosgrove Jr. (R-Chesapeake), said his chief objective is to protect police officers from anyone who might use a Freedom of Information Act request to attack them. He mentioned gang members as a possible threat.

“I feel the press has grossly mischaracterized this in their reporting,” he said.

Other supporters of the bill said it would not prevent officers from placing their names on citations or from identifying themselves on calls or while serving at schools or neighborhood meetings.

“What we’re concerned about is the wholesale release of all the names on the Internet,” said John Jones, executive director of the Virginia Sheriffs’ Association.

On the other side, Craig Merritt, an attorney for the Virginia Press Association, said the state’s public records law provides a check on patronage abuses, favoritism, discrimination and moonlighting by public employees at the public’s expense.

“It’s a way to put names with compensation and salary,” he said.

The bill was introduced in response to a recent court ruling that directed the state to turn over the names and employment dates of thousands of law enforcement officials to the Hampton Roads-area Virginian-Pilot newspaper. The paper has said it is seeking to determine whether problem officers are leaving their jobs and moving to other departments.

Del. Joseph R. Yost (R-Giles), who initially suggested tabling the bill, said he couldn’t understand the debate over disclosing names when most people today put personal information online through Facebook and Twitter.

“I don’t see in my mind having an individual’s name out there as being a threat to safety of others,” he said. “We all have our names out there in some way, shape or form.”