He said his bill, if passed, would end the secret, mass collection of telephone, bank, credit and Internet-usage records by government agencies such as the NSA and the FBI, which say the records are used in anti-terrorism investigations.

Any request for such records would need approval by the Foreign Intelligence Surveillance Court, and the requesting agency would have to focus on a specific individual and provide specific facts on why the information is relevant to an investigation of international terrorism or foreign intelligence.

NSA also would have to report to Congress within six months on how it will purge records gathered without these new standards.

The bill also applies similar restrictions to national security letters, or NSLs, which are used by the FBI to request the same type of records directly from banks, phone companies and credit firms without the knowledge of their customers.

Under the bill, an FBI agent would need judicial approval to send an NSL, and would have to provide specific information on the letter’s target.

“If we just focused on the (NSA) requests, they would use one or the other,” Walsh said. “This way we would close loopholes in both areas.”