FILE - This Thursday, Oct. 9, 2014 file photo shows the gurney in the the execution chamber at the Oklahoma State Penitentiary in McAlester, Okla. (Sue Ogrocki/AP)

THE UNITED States made progress on the death penalty in 2014, applying the ultimate punishment more sparingly than before. But it can’t be said to have been a good year. Dozens of people were still sentenced to die, even as a handful more of inmates on death row were exonerated. The mechanics of state-sanctioned death were also in the spotlight, as botched executions turned gruesome.

According to a year-end count from the Death Penalty Information Center, the country sentenced 72 people to death this year, the fewest number in 40 years, down from a high of 315 in 1996. The nation also conducted the fewest number of executions in 20 years, killing 35 people. That’s down from the 1999 high of 98 executions. As usual, just a few states were responsible for the vast majority: Missouri, Texas and Florida killed 28 people. Oklahoma, Georgia, Arizona and Ohio executed another seven inmates between them.

Though Oklahoma wasn’t the leader in the number of executions, it was the site of the most horrifying. The state attempted to kill Clayton Lockett last April with a novel combination of injected drugs that included a sedative, a paralyzing agent and a poison. According to a newly uncovered court document, the executioners missed Mr. Lockett’s femoral vein the first time around, possibly because the needle used was too short. Then they nicked an artery in the second try, spraying blood into the death chamber. Witnesses described Mr. Lockett convulsing, grimacing, struggling and speaking before prison staff lowered the blinds. The prisoner’s heart eventually stopped — more than 45 minutes after the execution began.

All states should end the death penalty within their borders. The risk of executing the innocent, evidenced by the seven men who were exonerated this year, is unacceptable. The financial cost of administering death penalty systems is also too high. Either consideration overwhelms arguments about the punishment’s usefulness as a crime deterrent.

But states that nevertheless continue to put people to death should at least make the punishment’s administration as fair and humane as possible. That means declining to execute if proper procedures, qualified staff and necessary equipment are absent. It means ensuring that strong legal protections are in place: The institutional presumption should be that the death penalty is to be applied only in truly exceptional circumstances. It also means that governors should use their authority to grant clemency in cases where there is any hint of doubt — or any room for mercy.

In the Washington area, Maryland’s leaders ended the death penalty last year. But four inmates remain on death row. Outgoing Gov. Martin O’Malley (D) should commute their sentences to life in prison without parole. Virginia has farther to go: The state still has the death penalty on its books, and last year the American Bar Association recommended several changes to state law and procedure that would make the system fairer, including the removal of barriers to getting post-sentencing DNA testing. Listening to the ABA would be the least Virginia’s leaders could do.