An undated photo of Ricky Gray, who was executed Wednesday night at the Greensville Correctional Center in Jarratt, Va., for murdering the Harvey family — Stella, 9, sister Ruby, 4, and their parents, Bryan and Kathryn — in 2006. (Virginia Department of Corrections via AP)

Ricky Gray was executed Wednesday night by the state of Virginia, a decade after he and his nephew cut a bloody swath from Pennsylvania to Richmond and left eight bodies in their wake.

Gray, 39, failed in his final days to convince Gov. Terry McAuliffe (D) or the federal courts that his execution by injection should be delayed.

He was scheduled for execution at 9 p.m. He was pronounced dead at 9:42 p.m., according to Lisa Kinney of the Virginia Department of Corrections. A witness, Frank Green of the Richmond Times-Dispatch, who has seen many state executions, said the process took 33 minutes — an unusually long time. “Once it got going, I saw more labored breathing than I have seen in the past, but I’m not sure of the significance of that,” he said.

It was the first time Virginia executed a prisoner using a drug combination that included midazolam, a sedative involved in several botched executions. Gray was also the first prisoner to be executed since Virginia passed a law blocking the release of information about compounding pharmacies that produce death penalty drugs.

The U.S. Supreme Court has narrowly upheld the use of midazolam in executions.

Gray declined to make a last statement, Kinney said.

Moments after the execution, one of Gray’s attorneys, Elizabeth Peiffer, said the public knew of Gray’s crimes but not his later remorse. “His death will take from the world a man trying hard to make amends and to make life better for others,” she said.

Gray’s crimes were among the most vicious in recent Virginia history. While implicated in the deaths of four other people, including his wife, Gray was convicted of slaughtering the Harvey family. Bryan Harvey was a popular local musician and computer technician; his wife Kathryn owned a quirky gift store. They were fun-loving and welcoming.

When Gray and Ray Dandridge came to rob the home on New Year’s Day in 2006, the front door was unlocked. The pair tied up Bryan, Kathryn, 9-year-old Stella and 4-year-old Ruby in the basement. Gray slashed them with a razor knife and battered them with claw hammers until they no longer moved. Then he set the home on fire. He and Dandridge ran off with a handful of items.

Dandridge is serving a life sentence in prison.

Gray’s attorneys unsuccessfully argued that the secrecy about the pharmacies and problems in past executions warranted further judicial review of the drugs. They also said the rapes and beatings Gray endured as a child and his subsequent PCP use were not explained to the jury that sentenced him to death. He was high on the psychosis-inducing drug during the killings, they said; in prison he had been a model inmate.

Gray “tried to honor the two Harvey girls by serving as a father figure to his much younger sisters and making sure their childhoods are better than what he endured,” attorneys Jon Sheldon and Rob Lee said in a statement. “We regret that he will no longer be able to try to make amends for his past wrongs.” 

Like other states, Virginia has struggled to obtain the drugs needed to execute prisoners because of pressure on pharmaceutical companies to stop selling them. The state allows a prisoner to choose death by electrocution, but the default method is lethal injection.

Clarence Williams contributed to this report.