Connecticut is likely to become the fifth U.S. state in five years to ban the death penalty, after lawmakers voted Thursday to replace capital punishment with life in prison without parole.

The state Senate voted 20-16 to outlaw the death penalty, sending the legislation to Connecticut's House of Representatives. The Democrat-majority House is expected to pass the repeal, clearing the way for Gov. Dannel Malloy, also a Democrat, to sign it into law.

The reality is the death penalty cannot be applied in a fair and impartial manner and there can be no guarantee against error, Senate Majority Leader Martin Looney said after the early-morning vote in Hartford, the state capital.

The maximum penalty of life in prison without parole will apply to future Connecticut inmates, although people convicted of special circumstances crimes could face additional punishment.

These inmates will face conditions that are similar to and in some cases more severe than conditions on death row, said Senate President Donald Williams, a Democrat. It is a punishment and sentence that is certain and final.

The push to eliminate the death penalty came in the aftermath of a shocking 2007 home invasion in Cheshire, Conn., that ended in a triple murder. The two men convicted were sentenced to die by lethal injection, following a highly publicized trial that put the case at the center of the death-penalty debate.

William Petit, a physician, was the sole survivor of the attack in which his wife and two daughters were sexually assaulted and killed. He lobbied for Connecticut to keep capital punishment, including a last-minute appeal against the legislation with the Senate's top Republican, Minority Leader John McKinney.

We believe in the death penalty because we believe it is really the only true just punishment for certain heinous and depraved murders,'' Petit was quoted as saying.

To gain support, a bipartisan amendment was added to ensure the repeal would apply only to future prisoners, not the 11 currently on the state's death row, according to the Connecticut Mirror. Despite the compromise, the measure is divisive in the state's legislature. The Senate voted mostly along party lines, with two Democrats joining the 14-member Republican caucus to oppose the bill.

Once the repeal is enacted, Connecticut will become the 17th state to ban capital punishment in favor of life in prison without parole as the maximum sentence. Since 2007 four states -- New Mexico, Illinois, New Jersey and New York -- have banned capital punishment. California voters will decide the issue in November.

Connecticut last carried out an execution in 2005, the state's first in 51 years, when convicted serial killer Michael Ross was administered a lethal injection after waiving his rights to appeal.