Getty Images

The National Security Agency's warrantless domestic surveillance program is now under fire from an unusual source: gun-rights groups.

A federal lawsuit filed today in San Francisco says the NSA's decision to vacuum up nearly all U.S. phone records, including local calls, on a daily basis violates federal law and the Constitution, which protects Americans' rights to speak freely and not be subjected to ongoing warrantless surveillance.

Plaintiffs in the lawsuit include Calguns Foundation, a nonprofit membership organization based in San Carlos, Calif.; the California Association of Federal Firearms Licensees, an industry association of dealers, collectors, and shooting ranges; and Franklin Armory of Morgan Hill, Calif., known for manufacturing AR-15 and other types of semiautomatic rifles that can legally be sold in California.

They, along with more traditional plaintiffs including Greenpeace, People for the American Way, and the Free Software Foundation, claim that the NSA's acquisition of logs of their members' communications violates their First Amendment right "to communicate anonymously and to associate privately." The lawsuit says the phone call logs reveal "sensitive information about their personal, political, and religious activities" that should not be available to the government in these circumstances.

"People and the organizations they choose to associate with have a Constitutional right to real, meaningful privacy," Brandon Combs, president of the California Association of Federal Firearms Licensees, one of the plaintiffs, told CNET this morning.

The lawsuit is being organized by the San Francisco-based Electronic Frontier Foundation, which has a separate lawsuit in progress challenging warrantless NSA surveillance of the contents of Americans' Internet and phone communications by tapping into AT&T's fiber links. A federal judge last week ruled those claims, which have been corroborated by documents leaked by Edward Snowden, could proceed.

Getty Images

"California's gun laws are so byzantine that law-abiding folks turn to our telephone hotline to figure out if they're accidental felons," said Gene Hoffman, chairman of the Calguns Foundation. "It scares our members that there is a record of such a sensitive conversation."

Unlike EFF's earlier lawsuit, which focuses on the contents of private communications made available under the 2008 FISA Amendments Act, the new lawsuit challenges logs turned over to the NSA under the 2001 Patriot Act. Those logs are vacuumed up from AT&T -- and Verizon and Sprint as well, according to news reports -- and do not include the contents of phone calls.

"The government doesn't get to claim that we have that [information] and then do whatever it wants -- just because they've made it so we don't know what and when they steal, read, and store our data," Combs said. "The NSA is chilling speech and association because people of all ideological backgrounds are rightfully afraid of being monitored by the most powerful and secretive government agency in the nation."

The lawsuit also alleges violations of the Fourth Amendment, which restricts warrantless surveillance; the Fifth Amendment, which protects Americans' due process rights; and federal surveillance law. It asks the court for a "preliminary and permanent injunction" halting the surveillance program.