A 17-year-old girl was killed in Alexandria earlier this week by a teenager who then turned his gun on himself, police said.

After his death, 19-year-old Yerson Nunez Lopez was identified by police. But his victim will not be publicly named. A state law passed this year bars the disclosure of any information that might identify her without her family's approval, which police do not plan to seek.

The law, sponsored by House Majority Whip Jackson H. Miller (R-Manassas), requires written consent from next of kin before any information that identifies a minor victim of a crime can be released by law enforcement.

Miller said the bill was inspired by the case of 2-year-old Kyra Franchetti, who was killed by her father in a murder-suicide in Fairfax County last year. Family had asked Fairfax police not to release the girl's name, but authorities concluded that they had to do so, Miller said. Her mother approached Miller's office about changing the law.

“Her mother wanted peace and didn’t want her daughter’s name out in the media and felt that it was very unfair,” Miller said. “People need to know about the crime, but they don’t necessarily need to know the victim’s name.”

Del. Sam Rasoul (D-Roanoke) was the only member of the House of Delegates to vote against the bill. He said he was concerned that the prohibition might go beyond a name and deprive people of useful information about dangers in their communities.

“I always err on the side of transparency,” he said.

Virginia law already prohibited the release of names of victims of sexual assault or domestic abuse without consent. Miller’s original bill sought to extend that right to next of kin in such cases when the victim was killed. Ultimately, lawmakers agreed that it should apply to all murders involving minors, not just sexual or domestic crimes.

“The release of her name to the public doesn’t further the investigation, and I don’t think it rises to the level of ‘need to know’ by the public rather than want to know, and it puts unnecessary public pressure on a grieving family,” Alexandria police spokeswoman Crystal Nosal said in an email.

Nosal noted that police in Alexandria already chose not to release the names of most juvenile victims. A 3-year-old killed in a car accident last month was not named, although there was no criminal act involved.