Outgoing Democratic Gov. Martin O'Malley said Wednesday that he will commute the capital sentences of the state's last four inmates on death row to life in prison, saying executing them "does not serve the public good of the people of Maryland."

Two years ago, the General Assembly abolished the death penalty in the state, making the ultimate sentence in new cases life in prison without the possibility of parole.

That left five previously sentenced inmates on death row; one of them, John Booth-El, died in prison this year.

The governor noted in a statement that outgoing Democratic Attorney General Doug Gansler recently asserted that carrying out prior sentences would be illegal in the absence of an existing statute.

"The question at hand is whether any public good is served by allowing these essentially un-executable sentences to stand," O'Malley said. "In my judgment, leaving these death sentences in place does not serve the public good of the people of Maryland -- present or future."

The governor said he had met or spoken with many of the relatives of the people killed by the inmates, and he thanked them for talking with him about the cases.

But he said that his failing to act at this point in the legal process would "needlessly and callously subject survivors, and the people of Maryland, to the ordeal of an endless appeals process, with unpredictable twists and turns, and without any hope of finality or closure."

O'Malley will leave office next month after having served two terms, the limit in Maryland. Gansler will leave office at the same time after a failed bid for the Democratic nomination for governor.

Robert Biddle, an attorney for death row inmate Jody Lee Miles, argued in a letter to O'Malley last month that the governor should not commute his client's sentence to life without parole because Miles "deserves the opportunity to make a case" in court for a life sentence with the possibility of parole. Biddle declined to comment Wednesday beyond what he said in the letter.

Gansler argued three weeks ago before the Maryland Court of Special Appeals that Miles should be re-sentenced to life without parole. He urged judges on the state's intermediate appellate court to send the case back to a circuit court for a new sentence.

He outlined two main reasons. First, Maryland's highest court ruled in 2006 that a legislative panel needed to approve protocols for lethal injection before an execution could take place, a step that has yet to be taken. Second, when lawmakers banned capital punishment last year, Gansler said they also repealed a law that enabled the Maryland Department of Public Safety and Correctional Services to introduce lethal injection protocols.

While his arguments applied directly only to Miles, Gansler said they opened a door for attorneys for the other three inmates to seek new sentences.

In addition to Miles and Evans, the remaining death-row inmates are Heath Burch and Anthony Grandison.

Miles was convicted of a 1997 death in Mardela Springs, on Maryland's Eastern Shore. Evans and Grandison were convicted in a 1983 killing of two people in Baltimore County. Burch was sentenced to death for killing a couple in 1995 in Capitol Heights, near Washington.