The legislation, called the USA Freedom Act and sponsored by an unusual coalition of conservative Republicans and liberal Democrats, passed the House Judiciary Committee on Thursday with overwhelming support from both parties, and it appears headed for approval by the full House. It attracted some Republican votes by increasing penalties for anyone convicted of material support for terrorism and by making it possible for intelligence agencies to keep tracking suspected terrorists for 72 hours after they enter the country before needing a warrant.

The measure faces a more uncertain future in the Senate, where a similar bill failed by two votes to overcome a filibuster last year. But because the legal authority for domestic bulk data collection expires on June 1, Congress faces a deadline that is likely to prompt it to take at least some action rather than let the program disappear altogether.

The bulk collection program, authorized under Section 215 of the Patriot Act, generated some of the fiercest criticism after Mr. Snowden revealed details about it in 2013. The N.S.A. cast the widest possible net for call data by forcing the major phone companies, under a secret court order, to pour their data directly into government computers. But what the government received was only “metadata” — phone numbers called, as well as the duration and time of calls, but not the content of the conversations.

Under the new legislation, the government would no longer be allowed to keep a database of that information and would be limited to obtaining data from the telecommunications companies when there is a “reasonable, articulable suspicion” that a “specific selection term” used to request data is associated with international terrorism, according to an analysis by the Electronic Frontier Foundation, a civil liberties advocacy group.

The foundation’s analysis said the bill “should end” the bulk collection of “everybody’s phone records.” But it pointed out that the N.S.A. could still search for records beyond telephone data with fewer restrictions. And it noted that the bill would not address warrantless collection of Americans’ international calls and e-mails under Section 702 of the Foreign Intelligence Surveillance Act amendments of 2008.

The future of the bulk collection program may have been sealed in December 2013, when a panel of experts appointed by Mr. Obama found that the program had been of minimal intelligence value and ran considerable risks of invading privacy.