(Rick Bowmer/AP)

NO STATE has carried out an execution after repealing capital punishment, even if the new law didn’t apply to inmates already on death row. The reason is clear: Once lawmakers have determined that a death sentence is ineffective in deterring crime, arbitrary, unfair or even racist, it makes no sense to go forward with a sentence arrived at under such a flawed system.

Since 2009, three states — New Mexico, Connecticut and, just last year, Maryland — have abolished capital punishment, leaving a total of 17 death-row inmates in legal limbo. Governors in each state are empowered to commute the inmates’ sentences to life without parole, yet none has done so.

They should. To carry out executions post-repeal would be both cruel, because the legislation underpinning the sentence has been scrapped, and unusual, because doing so would be historically unprecedented.

The clearest case is Maryland. Gov. Martin O’Malley (D) should act, before he leaves office in January, to commute to life without parole the sentences of four prisoners condemned before the state abolished capital punishment.

Before it eliminated the death penalty, Maryland had executed just five convicts in four decades and none since 2005, after which the state’s Court of Appeals declared that the procedures for lethal injections were unconstitutional.

Those procedures were never revised by Mr. O’Malley, who opposes the death penalty, meaning that capital punishment was effectively suspended in Maryland. And when lawmakers repealed the death penalty last year, they left the state with no rules and regulations by which any existing sentences might be carried out.

Taking note of that reality, Attorney General Douglas F. Gansler (D) recently determined that carrying out a death sentence in Maryland is now “illegal and factually impossible.”

Mr. Gansler’s position carries special weight. A former top prosecutor in Montgomery County, he opposed the 2013 repeal of the death penalty, which was not intended to apply retroactively.

Nonetheless, Mr. Gansler recognized in a legal brief filed in support of commuting one of the condemned men’s sentences that, since the death penalty has been repealed, there is no legal way to implement regulations for executing prisoners at this point.

Gov.-elect Larry Hogan (R), who supports capital punishment, has said that he would review petitions for commutation on a case-by-case basis. Yet if he were to refuse to commute, Maryland would face the same absence of regulatory means to carry out a death sentence. Why plunge the state, the legislature and the prisoners into such a legal morass?

Mr. O’Malley has been definitive and forceful in opposing the death penalty. In signing the abolition of capital punishment into law last year, he was unequivocal: “It’s wasteful. It’s ineffective. It doesn’t work to reduce violent crime.”

Having made the moral case for abolition so eloquently, he should have no trouble making the practical case for commutation to life without parole for the four remaining condemned men. And he should act without further delay.