In a vote of support for transparency in state-sponsored executions, the Virginia House of Delegates on Tuesday killed a bill that opponents said would have shrouded lethal injection in unprecedented secrecy.

The controversial measure was intended to keep drugs used for lethal injection flowing into Virginia by shielding manufacturers from public scrutiny and political pressure.

Despite bipartisan support from Gov. Terry McAuliffe (D) and the Senate, the overwhelmingly Republican House killed the bill, 56 to 42.

The bill, sponsored by Senate Minority Leader Richard L. Saslaw (D-Fairfax), passed the Senate, 23 to 14, earlier this month.

Saslaw said he was surprised to see the bill fail but cited opposition to the death penalty and concerns about government secrecy.

“The combination of the two” seemed to do the bill in, he said. “I would imagine within a year or two you’re probably going to see a bill to just go back to the electric chair.”

In Virginia, inmates sentenced to the death penalty have a choice between the electric chair and lethal injection, but drugs are the default method of execution.

Saslaw carried the bill at the request of the administration. McAuliffe’s spokesman, Brian Coy, did not return calls Tuesday seeking comment on its failure.

The issue was thrust into the national spotlight after foreign companies stopped selling lethal-injection drugs because of pressure from their governments. That left some states unable to carry out death sentences and prompted others to experiment with new chemical combinations that have been blamed for several ­high-profile botched executions.

Del. James M. LeMunyon (R-Fairfax) voted against the bill after making an unsuccessful attempt to shelve debate until next year.

“I think open government trumped secrecy today, and that’s a good thing,” he said.

The legislation would have prevented the public from scrutinizing almost everything to do with the death penalty in Virginia.

The bill called for “all information relating to the execution process” to be exempt from the state’s open-records law. Although the names and quantities of chemicals used would have had to be disclosed, the names of the companies that sell them and information about buildings and equipment used in the process would have been withheld.

Del. David B. Albo (R-Fairfax), who voted for the bill, offered an amendment that would have let defense attorneys and their clients see confidential information about the drug formulation and who made the drugs.

His goal was “to make sure they weren’t putting something in there that wasn’t approved,” he said.

In the House, all Democrats and a strong contingent of Republicans with concerns about privacy joined forces to kill the bill.

“I’m pleased that some sense of rationality and dignity prevailed,” said Del. Scott A. Surovell (D-
Fairfax). “Anytime somebody in the government wants to restrict information about what the government is going to do, I think we need to ask some really difficult questions and get some straight answers before we grant them that right.”

The state Supreme Court is considering a case brought by Surovell over an open-records request he filed — and the state denied — for documents related to lethal-injection drugs, execution protocols and other issues. The U.S. Supreme Court is also reviewing lethal injections in Oklahoma.

Laura Vozzella contributed to this report.