“This is the worst possible time to be tying our hands behind our backs,” Mr. McConnell said before the vote, expressing the concerns of those who argued that the program was a vital tool in the fight against terrorism.

But Tuesday’s vote only put off until next year a debate over security and personal liberties. While a Republican-controlled Senate is less likely to go along with the kinds of reforms that were in the bill, which sponsors had named the U.S.A. Freedom Act, the debate could further expose rifts between the party’s interventionist and more libertarian-leaning wings.

The new Congress will also be working against a hard deadline because the legal authority for the data collection will expire next year.

Under the bill, which grew out of the disclosures in June 2013 by Edward J. Snowden, the former intelligence contractor, the N.S.A. would have gotten out of the business of collecting Americans’ phone records. Instead, most of the records would have stayed in the hands of the phone companies, which would not have been required to hold them any longer than they already do for normal business purposes, which in some cases is 18 months.

The N.S.A., Mr. Snowden revealed, was systematically collecting telephone metadata — information about who called whom, but not the content of what was said — from major American phone companies. The program began after the Sept. 11, 2001, terrorist attacks, based on an assertion of unilateral executive power by President George W. Bush. In 2006, the Foreign Intelligence Surveillance Court secretly brought the program under its authority and started issuing orders to the companies under the Patriot Act.