A federal appeals court dealt a blow to the gun lobby on Tuesday by upholding two San Francisco gun laws requiring owners to securely store their weapons and regulating ammunition dealers.

Handgun owners in San Francisco currently must use trigger locks or secure weapons in a safe inside their homes when they are not carrying them. The restriction aims to prevent unauthorized users and children from accessing guns. Additionally, the city forbids licensed ammunition dealers from selling hollow-point bullets, which expand upon impact and can cause massive damage to the human body.

The U.S. Court of Appeals for the Ninth Circuit, in San Francisco, defended the two separate pieces of legislation this week as reasonable attempts to increase public safety without destroying residents’ Second Amendment rights.

The National Rifle Association (NRA) and several other gun supporters objected to both laws with the belief that gun locks burden Second Amendment rights. The NRA did not respond to msnbc’s request for comment.

“Even when a handgun is secured, it may be readily accessed in case of an emergency,” Judge Sandra Ikuta wrote Tuesday in the three-judge panel’s decision. Residents are allowed to use handguns to defend their homes, she added.

The restriction on ammunition “imposes only modest burdens on the Second Amendment right,” Ikuta wrote of the other bill.

The Second Amendment protects individual rights, but the judges agreed the government can impose restrictions with the intent of enhancing safety, said Christine Van Aken, chief of appellate litigation and San Francisco’s deputy city attorney.

“The Ninth Circuit took the view that as long as it’s not a significant burden on the ability of people to have guns and use them when they’re needed, the government is allowed to regulate for good reasons. Here the idea is public safety and protecting children,” Van Aken told msnbc.

The case was the first that involved the safe storage of firearms at the federal level since a landmark decision in 2008 when the U.S. Supreme Court held the Second Amendment protects an individual’s right to possess a firearm for traditionally lawful purposes, such as self-defense. The court then also struck down the portion of an act that required all firearms be kept unloaded and disassembled or bound by a trigger lock. (Similar to the San Francisco circuit court, the highest court in Massachusetts affirmed the state’s tough gun storage law last January.)

“It should encourage other communities that are thinking about safe storage laws that they’re perfectly consistent with the Second Amendment and constitutional. We hope it spurs action elsewhere,” Cody Jacobs, staff attorney at the Law Center to Prevent Gun Violence, told msnbc.

The national debate about gun rights continues in federal and state courtrooms across the country more than a year after the 2012 mass shooting at Sandy Hook Elementary School. The Supreme Court this week ruled unanimously that federal law bans people convicted of misdemeanor domestic abuse charges from owning guns.

But at the state level, Republicans lawmakers in Georgia last week passed a controversial “guns everywhere” bill that will allow firearms in bars, nightclubs, classrooms, and certain government buildings upon signature from the Republican governor. Legislators in the state House passed a similar bill last year, but it failed in the state Senate.

Similarly, Oklahoma legislators recently passed a bill that would allow any college, university or technology school to establish a policy to permit license-carriers to have guns on campus. In Idaho, Republican Gov. Butch Otter signed into law a bill that prohibits state colleges and universities from regulating guns.

Also in San Francisco, a district court last month crushed an attempt by gun advocates to block a city law banning magazines of more than 10 rounds. But the NRA continues to challenge a similar ruling in Sunnyvale, Calif., where a federal judge earlier this month permitted the city to enforce a voter-approved ban on high-capacity magazines.

Eight states and Washington, D.C., have enacted laws banning large-capacity ammunition magazines. Though the numerical definition varies, magazines with a capacity of more than 10 rounds of ammunition generally are considered “large capacity.” The accused gunman in the Aurora, Colo., movie theater massacre used a 100-round magazine during the shooting, which killed 12 people and left scores wounded.

Lawmakers recently litigated these bans in both Connecticut and New York, where judges upheld the prohibitions on large-capacity magazines that can hold more than than 10 rounds, because the legislation balances Second Amendment gun rights and the Obama administration’s call to reduce violence.



RELATED: Court upholds constitutionality of Conn. gun-control law



By the end of last year, Americans’ support for tight gun-control laws had dropped to pre-Sandy Hook levels.

The nonprofit Law Center to Prevent Gun Violence ranked California No. 1 and gave the state an “A-” grade for enacting 10 new laws in 2013 that strengthen gun restrictions. In 2010, the Golden State had the ninth lowest number of gun deaths per capita, according to the center. But California is the fourth largest supplier – among all 50 states – of crime guns to Mexico when population is taken into account.