Little noticed during the frenzied closing days of the legislative session was final passage of a measure that provides a certificate of stillbirth to grieving parents. The bill languished for years because of objections from some pro-choice advocates, who fear that it opens the door to conferring personhood on a fetus.

What changed? No one is certain. Albany insiders say that Democratic Assemblyman Dennis Gabryszak was replaced as prime sponsor by Sandra Galef, a pro-choice woman; otherwise, the pro-choice “veto” would’ve continued.

As the bill awaits Gov. Cuomo’s signature, it has given hope to the supporters of the Unborn Victims of Violence Act. That legislation — which I sponsored for several years — would allow prosecutors to bring dual charges against those who harm a pregnant woman and her unborn child.

But it, too, has been bottled up by those who fear that granting any legal status to any fetus will somehow put us on a slippery slope to outlawing abortion. This, though the bill explicitly states that it neither alters any abortion laws nor seeks to circumvent Roe v. Wade.

New York Penal Law addresses offenses committed against a person, such as homicide and assault. The law has been strengthened at various times to provide greater protection for, among others, children. Yet significant loopholes remain relating to homicide and assaults in which unborn children are the victims.

Our penal code has its roots in the English common law, which — guided by premodern medical science — saw the killing of an unborn fetus not as murder but as a lesser crime.

Try telling that to the parents of Niasha Delain, a pregnant bank teller slain in 2008 on her due date by her estranged boyfriend. Despite murdering Niasha and her full-term baby, the killer was only charged with second-degree manslaughter and a felony abortional act.

Pro-choice advocates fear that any change to the law here will undermine Roe v. Wade. But Roe covers actions taken by a woman and her doctor — it certainly doesn’t grant a third party any right to terminate a pregnancy without the woman’s consent.

And courts in liberal Massachusetts have held that viable fetuses can be treated as persons in homicide cases — yet abortion rights remain perfectly secure there, and in 35 other states with similar laws.

New York law now effectively denies adequate protection to pregnant women and their unborn children. Although the murdered babies are laid to rest in marked graves and the families grieve for them, our state tells them that their loved ones never existed.

The refusal to recognize the intrinsic value of an unborn child’s life amounts to zealotry. This is insensitive toward the mothers and their loss. It seems to treat the loss of an unborn child as though it were a bruise or a broken bone. Yet broken bones heal; a stolen life can never be replaced.

Pro-choice politics requires Democrats to march in lockstep or face electoral consequences. But Democratic lawmakers should learn the lesson of gay marriage — and recognize that there would be little voter backlash in passing the Unborn Victims of Violence Act.

In allowing the bill to come to a vote, Assembly Speaker Sheldon Silver and Senate Majority Leader Dean Skelos would give their members the opportunity to express their willingness to protect pregnant women who freely choose to have children. The vote would be not unlike the vote on the Marriage Equality bill; legislators should be free to vote their conscience without anyone thinking they have abandoned their position on abortion.

I urge Gov. Cuomo to sign the Stillbirth Certificate bill into law and hope I’ll soon be able to urge him to sign the Unborn Victims of Violence Act, too. New York should respect and protect the choices of all women and their unborn children.

Michael Benjamin retired from the Assembly last year after eight years representing a Bronx district.