The American Civil Liberties Union filed a lawsuit Tuesday challenging the constitutionality of the U.S. government's surveillance program that collects from U.S. phone companies the call records of tens of millions of Americans.

It is the first substantive lawsuit following reports last week detailing two sweeping surveillance programs run by the National Security Agency under laws authorized by Congress after the Sept. 11, 2001, terrorist attacks.

The ACLU suit, filed in the U.S. District Court for the Southern District of New York, challenges the legality of the spy agency's collection of customer "metadata," including phone numbers dialed and the length of calls. The lawsuit is asking the court to force the government to end the program and purge any records it has collected.