The San Jose City Council approved a measure by a one-vote margin Tuesday that requires gun owners to secure their firearms when they are not at home.

The measure passed 6-5 and requires firearm owners to store their guns either in a locked container or disable them with a trigger lock before leaving their residence. Supporters contend that 286 firearms were reported stolen out of 9,270 residential burglaries reported in the city of one million in the past three years, making the ordinance a matter of public safety.

“We want to reduce the opportunities and possibilities of those who should not have access to guns and ensure that guns are properly stored at all times to prevent unnecessary and indefensible access and use,” said Councilmembers Raul Peralez and Chappie Jones in a memo to the Council.

The move, proposed last year, sets up those who have an unsecured gun stolen for fines of $1,000 and as much as six months in jail. Going past homeowners and renters, the requirements also apply to those in condos, hotels, time shares, and recreational vehicles inside the city.

In 51-pages of letters to the Council concerning the proposal, most who wrote in opposed the measure, contending it would have little impact on crime and would penalize victims of burglaries while putting residents at risk in a self-defense encounter. In contrast, local media described Tuesday’s meeting as emotional, with vocal advocates on both sides of the issue.

City Councilmember Lan Diep voiced his concerns, saying the Council was micromanaging the actions of law-abiding citizens and cautioned against a one-size-fits-all mandate for a municipality with varied gun owners.

“A person who lives in a single-family home is probably more susceptible to burglary than one who lives in a high-rise with onsite security,” said Diep, providing examples to place his argument in context. “Leaving a handgun in a bedside drawer may be acceptable in a house with an immobile newborn, but unacceptable in a house with teenagers. Yet if those teenagers are taught to respect and handle guns from a young age so that they view guns as a tool rather than a shiny toy, then perhaps less precaution is required in that specific household.”

The ordinance was opposed by the National Rifle Association and its state affiliate, the California Rifle and Pistol Association, but the Law Center to Prevent Gun Violence argued that safe storage ordinances are a preventative measure that can save lives.

“Studies have demonstrated that the risk of suicide—particularly amongst children and teens—is significantly higher in homes where a firearm is kept loaded and/or unlocked,” said the gun control group. “Additionally, a study of mass shootings demonstrated that in over half of shootings perpetrated by minors in elementary or secondary schools, the shooter used guns obtained from home that were likely unsecured.”

Proponents of the measure also pointed to the fact that San Fransisco’s mandate to lock up firearms, enacted in 2007, has withstood legal challenges and at least seven other cities– to include Los Angeles— have adopted similar measures in the past decade.