HARTFORD, Conn. – Gov. Dannel P. Malloy quietly signed a new law Wednesday that ends the state’s death penalty for future crimes, making Connecticut the 17th state to abolish capital punishment.

The Democrat signed the bill behind closed doors, without fanfare. An aide said Malloy was surrounded by lawmakers, clergy and family members of murder victims.

While he called it “an historic moment,” Malloy said in a written statement that it was a moment “for sober reflection, not celebration.”

The bill, which became effective immediately, was signed on the same day that a new Quinnipiac University Poll showed that 62 percent of registered voters in Connecticut still favor the death penalty for those convicted of murder.

“Many of us who have advocated for this position over the years have said there is a moral component to our opposition to the death penalty. For me, that is certainly the case,” he said. “But that does not mean — nor should it mean — that we question the morality of those who favor capital punishment. I certainly don’t.”

A former prosecutor, Malloy said he used to support the death penalty but his position evolved over the years.

“I learned firsthand that our system of justice is very imperfect,” he said, adding how he saw people who were poorly served by their lawyers, wrongly accused or mistakenly identified, as well as discriminated against.