NEW YORK -- After years of secrecy, the National Security Agency's phone records surveillance program had its day in open court on Friday, as civil liberties lawyers asked a federal judge in New York to shut it down, and government lawyers claimed ordinary Americans cannot legally challenge it.

U.S. District Court Judge William H. Pauley III did not immediately rule on issuing an injunction against the NSA program. But he did push the government on whether it respected Americans' rights to privacy and freedom of association, and whether Congress was adequately informed about the program.

"Never before has the government attempted a program of dragnet surveillance on this scale," warned Alexander Abdo, a staff attorney at the American Civil Liberties Union. The group brought its lawsuit against the program in June, just days after NSA leaker Edward Snowden revealed its existence. The ACLU is arguing that the government's surveillance exceeds both its powers under the Patriot Act, and under the First and Fourth amendments.

Department of Justice attorney Stuart Delery said ordinary Americans have no standing to challenge the collection of their call records. Citing a 1979 Supreme Court ruling, he said Americans have no reasonable expectation of privacy for those records, and that only phone companies can challenge their collection.

No telecommunications firm has ever fought an order from the Foreign Intelligence Surveillance Court, which oversees the NSA program and is closed to the public.

Delery also argued that the program is "carefully calibrated to the purpose for which it is being used" -- to map the call networks of those the government suspects are connected to terrorist groups.

Pauley questioned Delery, however, on whether all members of Congress were aware that the Patriot Act was used to support such a far-reaching program. Rep. James Sensenbrenner (R-Wisc.), the original author of the act, claimed in a brief to the court that he never envisioned the law as a way to sweep up every phone record. It appears many members of the House of Representatives, meanwhile, were uninformed about the Foreign Intelligence Surveillance Court's interpretation of the law when they voted on its reauthorization in 2011.

Delery replied that the House and Senate Intelligence committees, which were briefed on the program, "stand in the shoes" of Congress as a whole.

The judge questioned the ACLU about whether it could show that it had actually been harmed by the NSA program.

The ACLU's lawsuit is one of the most prominent of the legal efforts to stop the call records program, along with a suit by conservative lawyer Larry Klayman in Washington District Court and a request by the Electronic Privacy Information Center to have the Supreme Court consider the program on an emergency basis. The center's request was turned down Monday.

The government's position in those cases has been that only the Foreign Intelligence Surveillance Court, which repeatedly reauthorized the call records program, has the jurisdiction to consider its legality.

In the waning weeks of its current session, Congress is also considering various proposals for the call records program that either shut it down or enshrine it in law.

Also on HuffPost:

Loading Slideshow...
  • The sun rises behind the U.S. Capitol Dome early in the morning before the ceremonial swearing-in of President Barack Obama during the 57th Presidential Inauguration in Washington, Monday, Jan. 21, 2013. (AP Photo/Paul Sancya)

  • The Capitol dome is silhouetted as the sun rises in Washington, Monday, Oct. 15, 2012. (AP Photo/J. Scott Applewhite)

  • The moon rises behind the U.S. Capitol Dome in Washington as Congress worked into the late evening, Sunday, Dec. 30, 2012 to resolve the stalemate over the pending "fiscal cliff." (AP Photo/J. David Ake)

  • Dark clouds surround the Capitol dome on Capitol Hill in Washington, Friday, June 1, 2012, as severe weather comes to the area. (AP Photo/Alex Brandon)

  • The U.S. Capitol dome is seen on December on 17, 2010 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The dome of the Capitol is reflected in a skylight of the Capitol Visitor's Center in Washington, Tuesday, Jan. 1, 2013. (AP Photo/Jacquelyn Martin)

  • Storm clouds fill the sky over the U.S. Capitol Building, June 13, 2013 in Washington, D.C. (Photo by Mark Wilson/Getty Images)

  • Law enforcement officers line up on the lawn on the east side of the U.S. Capitol during the 32nd annual National Peace Officers' Memorial Service at the U.S. Capitol May 15, 2013 in Washington, D.C. (Photo by Chip Somodevilla/Getty Images)

  • Storm clouds fill the sky over the U.S. Capitol Building, June 13, 2013 in Washington, D.C. (Photo by Mark Wilson/Getty Images)

  • A U.S. flag flies at half staff on the U.S. Capitol April 15, 2013 on Capitol Hill in Washington, D.C. (Photo by Alex Wong/Getty Images)

  • The U.S. Capitol dome and Christmas tree are seen December 18, 2011 in Washington. (KAREN BLEIER/AFP/Getty Images)

  • A view of the U.S. Capitol's rotunda and a TV truck's satellite dish before the State of the Union address on Capitol Hill January 25, 2011 in Washington, D.C. (Photo by Brendan Smialowski/Getty Images)

  • A flag flies at half-mast over the dome of the U.S. Capitol in Washington, D.C., January 10, 2011, in honor of the six people killed in the shooting in Tucson, Arizona, that also severely wounded Arizona Representative Gabrielle Giffords. SAUL LOEB/AFP/Getty Images)

  • A Christmas after being lit by U.S. House Speaker Nancy Pelosi, D-Calif, is pictured before the Capitol Hill dome in Washington on December 7, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • The Capitol Dome is seen during a rehearsal for the Inauguration Ceremony January 11, 2009. (PAUL J. RICHARDS/AFP/Getty Images)

  • The U.S. flag flies in front of the US Capitol dome on December 24, 2008 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The dome of the U.S. Capitol is seen at dusk on December 9, 2008 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The Capitol dome is seen silhouetted against the rising sun in Washington, DC, on February 1, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • The illuminated Capitol Dome is pictured late November 21, 2008 in Washington, D.C. (PAUL J. RICHARDS/AFP/Getty Images)

  • The dome of the U.S. Capitol is seen in Washington, D.C. on September 20, 2008. (KAREN BLEIER/AFP/Getty Images)