Gov. Thomas Kean signed legislation yesterday making New Jersey the 37th state to allow capital punishment.

A former death penalty opponent who now believes it will deter crime, Kean signed the bill in the privacy of his office.

"He doesn't feel it's appropriate to sign it at a public ceremony," a spokesman said, adding that public signings usually are reserved for achievements that deserve attention.

A private signing also was seen as a means avoiding demonstrations by foes of capital punishment.

The legislation was opposed by the state Council of Churches.

It was sponsored by Democratic state Sen. John Russo, whose father was killed by a stranger who robbed his home on New Year's Eve, 1970.

But Russo's legislation would not have applied to his father's gunman had the law been in effect at the time.

Under the legislation, the death penalty can only be imposed on someone convicted of premeditated murder or arranging a contract murder.

Meanwhile, the Massachusetts Supreme Court cleared the way for a November ratification vote on a constitutional amendment to restore the death penalty there.

The amendment is aimed at nullifying a 1980 ruling by the court that said capital punishment violates the Constitution's prohibition against "cruel or unusual punishment."

If approved by voters in November, the state Constitution would specify that capital punishment does not conflict with any provision of the state's guiding document. The legislature then would be free to enact a death penalty law.