They said the measure also would overhaul the secret federal surveillance court, allow constitutional challenges and create an advocate to argue against the government.

The lawmakers said the legislation is necessary to ensure the privacy rights of Americans. Disclosures about the NSA programs this summer raised questions about protection of civil liberties. The Obama administration has insisted the spying was a necessary tool to fight terrorism.

The legislation comes on the eve of a Senate hearing with top intelligence officials.