MARYLAND IS SET to become the 18th state to scrap the death penalty, the sixth since 2007 and the first south of the Mason-Dixon line. The repeal, having now passed both houses of the General Assembly, is a major achievement for Gov. Martin O’Malley, who pushed hard for it, and for his fellow Democrats, who dominate the state ­legislature.

The measure replaces capital punishment with a life sentence without the possibility of parole; the governor is expected to sign the legislation in the coming weeks. Maryland voters are likely to have the last word if, as expected, death-penalty supporters collect enough signatures to petition the new law to referendum, probably in 2014.

Plenty of legislation is debated partly or largely on emotional terrain, but the arguments in favor of the death penalty stand out as almost exclusively emotional, couched in terms of society’s justifiable outrage and entitlement to vengeance.

A prime recent example was Scott Shellenberger, the state’s attorney for Baltimore County, who testified before lawmakers last month in favor of retaining capital punishment. In marshaling his arguments for state-sponsored executions, Mr. Shellenberger used the example of a convicted murderer who taunted the families of his victims at his sentencing.

No question, that is incendiary behavior, designed to elicit revulsion and white-hot hatred. But disgust and revenge are poor foundations for legislation and policy.

As Mr. O’Malley and others have noted, the death penalty is not an effective deterrent to murder. The homicide rate in Baltimore soared to stratospheric levels in the 1990s but has fallen sharply in the last few years; in neither instance is there any evidence that Maryland’s death penalty had any effect.

Marylanders themselves understand that; by a 2-to-1 margin they agree that executing people provides no deterrence to murder. Still, a solid majority favors capital punishment, according to a recent Post poll.

With popular opinion generally in favor of retaining capital punishment, it took guts for Mr. O’Malley and lawmakers to press for repeal. They will have to summon even more spine to fight for its repeal at referendum if the question gets on the ballot next year.

Until then, it is worth revisiting and reminding voters of the powerful arguments for repeal — the lack of deterrence; the racial imbalance in the administration of capital punishment; the steady drip of defendants wrongly convicted in capital cases; the impossibility of undoing the execution of a person who has been mistakenly condemned.

Since 1978, when capital punishment was reinstated in Maryland, just five people have been executed in the state — none since 2005 — but untold millions of dollars have been spent in litigating the cases of more than 50 others sentenced to death. As Mr. O’Malley has recognized, that is a damning portrait of ineffective and wasteful public policy.

It has taken years — and a sharply falling crime rate — to get to the point where cooler heads have finally prevailed in Annapolis on the question of capital punishment. The progress of repeal in one state capital after another is evidence that the nation is finally lining up with most of the West’s other democracies.