Virginia Gov. Terry McAuliffe. (Win McNamee/Getty Images)

— Gov. Terry McAuliffe’s administration tried — and failed — to reverse a House of Delegates vote killing a bill that opponents say would have shrouded state-sponsored executions in unprecedented secrecy, lawmakers said.

Several members of the House of Delegates said officials from the state Department of Corrections lobbied them to see if they would change their earlier votes. Those lawmakers asked House Speaker William J. Howell (R-Stafford) to hold a second vote on the bill Wednesday.

The aggressive lobbying by McAuliffe’s agency to keep drugs used for lethal injection flowing into the state put him at odds with many in his party who oppose capital punishment. Lawmakers from both parties opposed the measure because it would have removed transparency from state-sponsored executions.

A spokeswoman for the Department of Corrections did not return several messages. Brian Moran, the governor’s secretary of public safety and homeland security, who oversees corrections, did not return phone calls.

Brian Coy, a spokesman for McAuliffe (D), declined to comment on the agency’s efforts to flip lawmakers’ votes and referred to his earlier statements on the issue. Coy has said the governor does not support capital punishment but it is his responsibility to uphold the law.

“He is a Catholic,” Coy has said, “so there is a moral component to his position on the issue, but he’s governor, and he will enforce the law.”

The bill would have prevented the public from scrutinizing almost everything having to do with the death penalty in Virginia by exempting from the state’s open-records law the names of the manufacturers of the drugs and how they are made.

The measure comes as some states experiment with new chemical combinations that have been blamed for several high-profile botched executions.

Some states say they were left scrambling for a way to carry out executions after foreign companies stopped selling lethal-injection drugs because of pressure from their governments.

Del. C. Matthew Fariss (R-Campbell) said he told Department of Corrections officials that he would have changed his vote.

“They just told me it was important to them to have this bill . . . pass to make their process of obtaining these lethal drugs more efficient,” he said.

Opponents said the bill would have forced lawmakers to make decisions with no access to data on lethal injection in Virginia, which has no executions scheduled this year.

“Legislators do not want to be making policy judgments about matters like the death penalty with a bag over our heads, which is what they’re asking us to do,” said Del. Scott A. Surovell (D-Fairfax).

“I am baffled by why the governor would support this bill. In fact, I have wondered if he got bad advice somewhere along the way and just didn’t know what he was getting into,” said Corinna Lain, a death-penalty expert and law professor at the University of Richmond.

She called the bill “special-interest legislation, pure and simple.”

On Tuesday, all Democrats and many Republicans in the House formed an unlikely coalition and defeated the bill. Senate Minority Leader Richard L. Saslaw (D-Fairfax) carried the bill at the request of the McAuliffe administration.

Not long after the bill died by a vote of 56 to 42, Department of Corrections officials visited at least three lawmakers they considered sympathetic to their cause.

Howell directed the House clerk not to communicate the bill to the Senate — a procedural move that indicates the chamber may reconsider the vote.

But by about noon on Wednesday it became clear McAuliffe didn’t have the votes.

In addition to Fariss, Dels. James W. Morefield (R-Tazewell) and T. Montgomery Mason (D-Williamsburg) said they were visited by corrections officials.

Mason, who supported the bill at the committee level but voted no on the floor, said he would not have reversed his final vote.

“We’ve got to figure out how to solve the problem. It’s a big deal,” he said.

Morefield said: “I did indicate that I would consider reconsidering my vote. I was never provided with that opportunity.”

Fariss said he could have supported a bill that gave the state Board of Pharmacy or the governor oversight authority.

Others were adamant in their support of the original bill.

“This really puts the death penalty in peril in Virginia as a means of sentencing the worst of the worst. . . . For those of us who strongly believe in the death penalty as both a deterrent and a just punishment, this is a troubling time,” said Del. C. Todd Gilbert (R-Shenandoah), a criminal defense lawyer and former prosecutor who voted for the bill.

Opponents include the American Civil Liberties Union of Virginia, the Virginia Catholic Conference, Virginians for Alternatives to the Death Penalty and the Virginia Press Association.

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

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