SUNNYVALE -- A gun store owner and a national gun industry trade group have sued to block enforcement of parts of Sunnyvale's new gun control ordinance, claiming that it clashes with state and federal laws and tramples on constitutional rights.

The National Rifle Association plans to file its own lawsuit early next week. But Sunnyvale announced Tuesday that the San Francisco law firm of Farella Braun + Martel will offer its services for free to defend the ordinance against all challenges.

"Our community spoke loud and clear that we want to do what we can to prevent gun violence," said Mayor Tony Spitaleri. "The threats of lawsuits and defense costs didn't stop them from doing what they felt was right, and now we have one of the best law firms in the country prepared to defend us."

Sunnyvale's Measure C, approved by 67 percent of voters last month, requires gun owners to notify police within 48 hours of the loss or theft of a firearm, as well as to keep firearms locked up when not in the owner's immediate possession. It also requires ammunition sellers to log and keep buyers' names for two years and prohibits possession of ammunition magazines that hold more than 10 rounds.

A Santa Clara County Superior Court lawsuit filed Monday by U.S. Firearms; its owner, Eric Fisher; and the National Shooting Sports Foundation claims the ammo sales provision is pre-empted by state law and illegally shares customers' data with police -- and that the loss or theft reporting provision conflicts with state and federal laws.

Sunnyvale gun sellers already must comply with a wide range of state and federal laws and shouldn't have to operate under a patchwork of conflicting local laws, said Lawrence Keane, the foundation's senior vice president and general counsel.

"It is unjust to ask retailers within the Sunnyvale city limits to collect sensitive personal information from customers who easily can drive a few miles to a store in another city where such information is not required," he said. "Surely, no demonstrable public safety benefit is achieved, and only law-abiding businesses are penalized."

The NRA had threatened to sue even before Measure C was approved, and the group's West Coast counsel, Chuck Michel, intends to file that federal lawsuit Monday, a spokesman for Michel said Tuesday. Michel last month filed an NRA-supported suit against San Francisco over a similar ban on high capacity magazines.

But Sunnyvale taxpayers won't foot the bill because of the offer ofFarella Braun + Martel to defend the city against the gun-related lawsuits for free.

The city's residents voted to set "reasonable and sensible restrictions," said attorney Tony Schoenberg, who will lead the Measure C defense team. "We plan to vigorously defend the city in this important matter."

Josh Richman covers politics. Contact him at 510-208-6428. Follow him at Twitter.com/josh_richman. Read the Political Blotter at IBAbuzz.com/politics.