SANTA FE, N.M. (AP) — A New Mexico bill that would make it a crime to store firearms in places that children could access cleared a major hurdle with the endorsement of the state Senate on Friday.

New Mexico is among the top 10 states for firearms deaths per capita. Earlier this year, a 6-year-old student in Virginia shot his teacher, which renewed debates across the country about gun control and school safety.

The New Mexico bill from Democratic sponsors including Senate President Pro Tempore Mimi Stewart of Albuquerque advanced on a 24-16, party-line vote, with Republicans in opposition. House concurrence with recent amendments is needed to send the bill to supportive Gov. Michelle Lujan Grisham.

The bill would make it a crime to store a firearm in a way that negligently disregards the ability of a child or teenager under age 18 to access it. Criminal charges could be brought only if the minor later brandishes or displays the firearm in a threatening way, or uses it to kill or injure someone. The proposal would establish both misdemeanor and felony crimes, with penalties of up to 18 months in prison.

Stewart said she believes the initiative will reduce gun-related deaths and injuries among youths.

“These child-prevention laws do work,” she said. “Twenty-three states do have them, including our neighbors in Texas. There is evidence that they reduce the number of children killed or injured unintentionally.”

Exemptions from prosecution include instances when a firearm is kept in a location that a reasonable person would believe to be secure, as well as when a juvenile obtains a firearm in the course of self-defense or defense of another person.

Republican Sen. Cliff Pirtle of Roswell expressed doubt that the bill would be effective and emphasized that gun owners should be able to access firearms readily to defend their homes and families.

“It’s important to me to have the firearm accessible,” he said. “I’m going to defend my family and I’m going to raise my children to understand that firearms are not toys.”

The Democratic-led Legislature is advancing legislation that would establish a 14-day waiting period for firearm purchases and raise the minimum age to buy certain guns to 21. Lawmakers have until noon on March 18 to send bills to the governor.