The death penalty’s days in Connecticut are numbered.

After nearly nine hours of debate, the State House of Representatives passed a bill repealing capital punishment late Wednesday night, setting the stage for Connecticut to become the 17th state to abolish capital punishment. The House’s approval of the bill by a vote of 86 to 62 follows its passage in the Senate early Thursday morning, and Gov. Dannel Malloy has pledged to sign the bill into law once it reaches his desk.

“For decades, we have not had a workable death penalty,” Malloy said in a statement following the bill’s passage. “Going forward, we will have a system that allows us to put these people away for life, in living conditions none of us would want to experience. Let’s throw away the key and have them spend the rest of their natural lives in jail.”

The bill replaces capital sentences with life in prison without the possibility of parole. In order to corral support for the bill, Senate Democrats amended the bill to apply only to future convictions, meaning that the 11 inmates currently on the state’s death row — including Steven Hayes and Joshua Komisarjevsy, who were convicted and sentenced to death in the infamous 2007 Cheshire triple homicide — will still face capital punishment.

The bill also created a special felony murder charge carrying additional punishments for offenders convicted of committing murders that would have triggered capital sentences. The bill restricts inmates convicted of the new charge to two hours a day outside their jail cells, allows them only non-contact visitation and keeps them in a facility separate from those housing other inmates.

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

The bill’s passage in the House comes a day after city officials — including Mayor John DeStefano Jr., New Haven Police Department Chief Dean Esserman and State Senate Majority Leader Martin Looney, who represents New Haven and has spearheaded the repeal effort — held a press conference in City Hall to pressure the state to end capital punishment.

Looney said the death penalty is inappropriate because the criminal justice system is imperfect, citing James Tillman, who served a prison sentence for 16 years before being proven innocent, and Kenneth Ireland, who was exonerated after serving 19 years in prison.

“The reality is the death penalty cannot be applied in a fair and impartial manner and there can be no guarantee against error,” Looney said. “No fallible human system should have the power to take a life. Our system is subject to both good faith error and deliberate perversions of justice.”

A Quinnipiac University poll released last week revealed that Connecticut voters largely support capital punishment. According to the poll, 62 percent of Connecticut voters surveyed said abolishing the death penalty is a “bad idea.” Looney said the poll results often vary with how the death penalty issue is presented in polls, adding that previous polls have shown greater support for repeal when respondents are given the option to replace the capital punishment with life imprisonment, rather than the question of whether the death penalty should be allowed.

A Quinnipiac poll released last October supports Looney’s claim, finding that when given the option between the death penalty and life in prison without parole, only 46 percent of Connecticut voters continued to support capital punishment.

In 2009, a similar bill repealing the death penalty passed both chambers of the state’s General Assembly, but was vetoed by Republican then-Gov. Jodi Rell.

In the past 50 years, Connecticut has put only one person to death. In May 2005, the state executed serial killer Michael Ross, who requested the death penalty after being given the option of life in prison without parole.