Updated

The National Rifle Association on Wednesday filed an amicus brief in federal court supporting an American Civil Liberties Union lawsuit challenging a government phone-tracking program that collects the telephone records of millions of Americans.

The brief argues that the National Security Agency's phone records collection program could "allow identification of NRA members, supporters, potential members, and other persons with whom the NRA communicates, potentially chilling their willingness to communicate with the NRA."

The ACLU's lawsuit — which names as defendants the heads of national intelligence as well as the agencies they lead, including the National Security Agency, the FBI, the Department of Defense and the Department of Justice — argues the phone record collection program disclosed by former NSA contractor Edward Snowden is unconstitutional.

The suit, filed in federal court in New York in June, asks the court to halt the datamining effort and purge phone records collected under the program, claiming the government action violates the First and Fourth Amendments of the Constitution.

The NRA argues in the brief that it would be "absurd" to think that Congress would take steps to prevent the creation of a national gun registry while simultaneously allowing the NSA to gather records that "could effectively create just such a registry."

"If programs like those currently justified by the government’s interpretation are allowed to continue and grow unchecked, they could also—contrary to clear congressional intent—undo decades of legal protection for the privacy of Americans in general, and of gun owners in particular," the brief states.

President Obama and Army Gen. Keith Alexander, the NSA's director, have defended the program. Alexander explained at a computer systems analysts conference in August how how government methods used to collect telephone and email data helped foil 54 terror plots since 1993.

The ACLU claims standing as a former customer of Verizon, adding that the government likely has much of its metadata stored in its databases.

The suit also alleges the government's program exceeds the congressional authority provided by the Patriot Act and singles out a particular provision that has given the government more leeway in obtaining various records for intelligence investigations.

Supporting briefs were also filed Wednesday by the Reporters Committee for Freedom of the Press and a number of news organizations, including Fox Television Stations, Courthouse News Service, The McClatchy Company and The E.W. Scripps Company.

The Associated Press contributed to this report.