When Sunnyvale, California’s voters approved of Measure C, a new city ordinance with several commonsense gun safety measures, the gun lobby immediately attacked. Challengers to the new laws—a  gun dealer and a gun industry lobbying group—sued the city with claims that Measure C’s requirement that ammunition sellers keep records of their sales conflicted with California state law.  Fortunately, yesterday, a California state court rejected that argument and denied the plaintiffs’ emergency request that the law be put on hold while their lawsuit is decided.

Thanks to this initial ruling, Sunnyvale’s law—which was approved by 66% of Sunnyvale voters—will be allowed to go into effect and will help to deter minors, convicted felons, the mentally ill, and other prohibited persons from purchasing ammunition.

California cities have broad authority to pass local ordinances to keep their communities safe from gun violence and the Sunnyvale ordinance is nothing out of the ordinary. In fact, more than a dozen other cities and two counties, including Los Angeles and San Francisco, have enacted similar laws requiring ammunition sellers to keep records of ammunition sales.

This portion of Sunnyvale’s Measure C was based on the Law Center’s model ammunition ordinance, and when the city was sued, the Law Center was able to secure the highly-regarded law firm Farella Braun + Martel LLP as pro bono counsel for Sunnyvale.

The gun lobby has a history of bullying cities to keep them from enacting new gun laws by threatening costly lawsuits. This time, the gun lobby failed to intimidate the people of Sunnyvale when they overwhelmingly voted for Measure C, and now they are also failing in their attempt to overturn the will of the people in court.

One of the plaintiffs in this case, the National Shooting Sports Foundation, headquartered in Newtown, Connecticut, less than 3 miles from Sandy Hook Elementary School, is notorious for challenging smart gun laws in small cities across the country.

NRA-backed plaintiffs also sued the City of Sunnyvale on Monday, December 16 in yet another frivolous lawsuit, claiming that another part of Measure C, which bans the possession of large capacity ammunition magazines, violates the Second Amendment.

Fortunately, a wide variety of gun regulations have been upheld by the courts, including similar laws that limit magazine capacity. Since 2008, there have been over 800 Second Amendment cases challenging gun laws nationwide, with an overwhelming majority—96%—of the lower court decisions upholding those laws.

For more, read some of the recent gun violence prevention success stories.