Rights activists, church leaders and drug and gun rights advocates found common ground and filed a lawsuit against the federal government to halt a vast National Security Agency electronic surveillance program.

In the lawsuit filed Tuesday, San Francisco's Electronic Frontier Foundation, representing the unusually broad coalition of plaintiffs, is seeking an injunction against the NSA, Justice Department, FBI and directors of the agencies.

The suit filed in federal court in San Francisco challenges what the plaintiffs describe as an illegal and unconstitutional program of dragnet electronic surveillance.

The suit comes after former NSA contractor Edward Snowden leaked details about NSA surveillance programs earlier this year.

NSA public affairs deferred comment on the lawsuit to the Justice Department. A Justice Department spokesman did not immediately respond to a request for comment.