Florida's government agencies would be prohibited from releasing photos, video or audio that record the killing of a person in an act of mass violence, under a bill approved by the state Senate.

Inspired by last year's school shooting in Parkland that left 17 people dead, the bill says victims' relatives could be traumatized by the images, and that recordings and photos of mass killings could inspire others to kill.

“The Legislature is concerned that, if these photographs and video and audio recordings are released, terrorists will use them to attract followers, bring attention to their causes, and inspire others to kill. The Legislature also finds that dissemination of these photographs and video and audio recordings may also educe violent acts by persons who have a mental illness or who are morally corrupt,” the bill reads.

The bill says the Legislature also recognized that these types of images can be widely disseminated on the internet in an era when most people have access to computers and smartphones. That would subject victims' families to continuous injury.

In addition to the massacre at Marjory Stoneman Douglas High School, the bill states that lawmakers are “gravely concerned” about the 2016 mass shooting at the Pulse nightclub in Orlando, in which a gunman killed 49 people, and the 2017 shooting at a Fort Lauderdale airport that left five dead.

The bill defines an act of mass violence as an attack that leaves at least three people dead, not including the perpetrator. It bans the release of depictions of the actual killing or victims' bodies after an attack. Copies of those images and recordings could be released to victims' immediate families, and victim's relatives wouldn't be prohibited from releasing copies to the media or others. It doesn't ban the release of other images during an attack, such as a killer approaching a school or business or police responding to the scene, as long as bodies or killings aren't depicted.

Republican bill sponsor Sen. Tom Lee told reporters after the vote that he understands media plays a role in holding authorities accountable after an attack, and said news organizations can petition a judge for the release of recordings and photos.

He commended the South Florida Sun Sentinel for its coverage of the Parkland shootings and acknowledged the newspaper was helped by having access to video and recordings after the attack.

“If you read the Sun Sentinel, we would have been unlikely to get to the bottom of what happened in Parkland without access to that footage. If there's a compelling public interest, I'm hopeful the media will still be able to get to it,” Lee said.

But he also acknowledged that suing for access to recordings is expensive.

“There will still be that ability to go to court, and I frankly regret that they have to go to the extraordinary measures they do because going to court costs money — a lot of money,” Lee said. “But we looked at 11 ways to Sunday on how to write this to make it easier on the media to get access and this was the best we could do.”

A House version of the bill was approved by two committees and can now be considered by the full chamber.

Brendan Farrington reports for the Associated Press.