The Connecticut House of Representatives has given final legislative passage to a compromise that would prevent the release of crime scene photos and video evidence from the Sandy Hook Elementary School massacre and other homicides.

Gov. Dannel P. Malloy signed legislation into law Wednesday that prevents the public release of crime scene photos and video evidence from the Connecticut school shootings that took the lives of 20 first graders and six school employees.

The new law, a result of efforts to balance private and public interests, creates an exemption to the state's Freedom of Information Act and applies to homicides in Connecticut.

The law prevents the release of photographs, film, video and other images depicting a homicide victim if those records "could reasonably be expected to constitute an unwarranted invasion of the personal privacy of the victim or the victim's surviving family members."

Malloy signed the bill hours after the General Assembly approved the eleventh-hour compromise during the early morning hours of the final day of the state legislative session. Malloy said he believes "a parent of a deceased child should have the right to remember that child" as they wish and not because they were "caught up in some tragic and unbelievable circumstances."

The governor's office originally worked privately with legislative leaders and the state's top prosecutor to draft a bill that would address the concerns of families who lost relatives in the Sandy Hook Elementary School shooting in Newtown. They considered various proposals, including legislation applying only to the Newtown victims and allowing their families to decide whether certain information should be released.

But in the end, the bill was tailored off an exemption in the federal Freedom of Information law.

During a somber early-morning Senate debate on the bill, as several family members of the victims looked on, Senate President Donald E. Williams Jr. said lawmakers were moved by the parents' concerns and tried to come up with a fair proposal.

"We have tried our best as Democrats and Republicans to work together to protect the interests of these families, these parents, these relatives sitting behind me, at the same time honoring our tradition as a free and open democracy," he said.

The new law creates a one-year moratorium on the release of certain portions of audiotape or other recordings in which the condition of a homicide victim is described. The exemption does not include 911 emergency call recordings, however.

Additionally, it creates a task force that would make recommendations on the balance between victim privacy under the FOI law and the public's right to know. The task force must submit its recommendations by Jan. 1.

Disputes over the release of materials could be resolved as similar disputes have been in the past, either in the state Freedom of Information Commission or the courts.

Colleen Murphy, the commission's executive director, said the standard of an "unwarranted" invasion of the personal privacy of the victim or victim's surviving family members has never been time-tested in Connecticut. She said the commission decisions on this issue will be a first.

The Senate approved the bill 33-2; the House by a vote of 130-2.

Rep. Stephen Dargan, D-West Haven, who voted against the measure, said he was concerned about the message it sent.

"Some people that thought they were impacted underneath the Second Amendment feel that they're impacted underneath the First Amendment because the government is covering up or not letting the public have the right to know," he said.

On Tuesday, family members of the Sandy Hook victims began a vigil at the state Capitol, waiting for legislative action.

Mark Barden, whose 7-year-old son Daniel was killed, told The Associated Press he knows of individuals and groups that want the photos. Given today's technology, he said, one photograph can be distributed worldwide and remain accessible forever.

"It's these strange individuals and fringe interest groups that have expressed a very real need for this information and they don't have any business having it," he said. "Nobody would benefit from it. On the contrary, it would do so much harm."

Members of the legislature's Black and Puerto Rican Caucus also voiced concerns about the original legislation preventing only the release of photos from the Newtown massacre. Legislators then broadened the bill to include other homicides.

The Connecticut Daily Newspaper Association had expressed concern about the possibility of limiting access to the documents.

"Any time the state is interested in opening up the Freedom of Information Act, we urge them to use extreme caution. Obviously, there's deference to the tragedy that happened at Sandy Hook," said Christopher VanDeHoef, the association's executive director. "But it's our concern that we're going to use that as sort of a sweeping change to FOI law that could be damaging to the openness of government down the road."