WASHINGTON — The government’s authority to sweep up vast quantities of phone records in the hunt for terrorists was set to expire at 12:01 a.m. Monday after Senator Rand Paul, Republican of Kentucky, blocked an extension of the program during an extraordinary and at times caustic Sunday session of the Senate.
Still, the Senate signaled that it was ready to curtail the National Security Agency’s bulk data collection program with likely passage this week of legislation that would shift the storage of telephone records from the government to the phone companies. The House overwhelmingly passed that bill last month. Senators voted, 77 to 17, on Sunday to take up the House bill.
Mr. Paul’s stand may have forced the temporary expiration of parts of the post-9/11 Patriot Act used by the National Security Agency to collect phone records, but he was helped by the miscalculation of Senator Mitch McConnell, the majority leader, who sent the Senate on a weeklong vacation after blocking the House bill before Memorial Day.
Senator Rand Paul, Republican of Kentucky, who was headed to Capitol Hill on Sunday, said he would block the rapid passage of a bill allowing a national surveillance program. Credit Drew Angerer/Getty Images
Mr. McConnell, also of Kentucky, relented Sunday, setting up a final round of votes on Tuesday or Wednesday that will most likely send a compromise version of the House bill to President Obama for his signature. Even Mr. Paul, using the procedural weapon of an objection, conceded he could not stop that.
“Little by little, we’ve allowed our freedom to slip away,” Mr. Paul said during a lengthy floor soliloquy.
The expiration of surveillance authority demonstrates a profound shift in American attitudes since the days after the Sept. 11, 2001, terrorist attacks, when national security was pre-eminent in both parties. Fourteen years after that attack, even as American conflicts continue abroad, a swell of privacy concerns stemming from both the vast expansion of communication systems and an increasing distrust of government’s use of data has turned those concerns on their head.
While it would represent a retrenchment on the part of the government, it does not end the argument over the dual imperatives of security and individual liberty brought to light by Edward J. Snowden, the former contractor for the National Security Agency.
The expiration of three key provisions of the Patriot Act means that, for now, the N.S.A. will no longer collect newly created logs of Americans’ phone calls in bulk. It also means that the F.B.I. cannot invoke the Patriot Act to obtain, for new investigations, wiretap orders that follow a suspect who changes phones, wiretap orders for a “lone wolf” terrorism suspect not linked to a group, or court orders to obtain business records relevant to an investigation.
However, the Justice Department may invoke a so-called grandfather clause to keep using those powers for investigations that had started before June 1, and there are additional workarounds investigators may use to overcome the lapse in the authorizations.
Mr. McConnell and other national security hawks who failed to continue the program badly underestimated the shift in the national mood, which has found its voice with Democrats and the libertarian wing of the Republican Party. The moment also put him at odds with Mr. Paul, whom he has endorsed for president.
“I remain determined to work toward the best outcome for the American people possible under the circumstances,” Mr. McConnell said. “This is where we are, colleagues — a House-passed bill with some serious flaws, and an inability to get a short-term extension to improve the House bill.”
Mr. Paul’s effort clearly angered many of his Republican colleagues, who met without him an hour before the Senate began to vote Sunday night. Senator John McCain, Republican of Arizona, who sparred with Mr. Paul on the floor over procedure, said later that Mr. Paul was not fit for the White House job he seeks. “I’ve said on many occasions that I believe he would be the worst candidate we could put forward,” he said.
Even as senators were trickling into the Capitol from the airport, Mr. McConnell attempted to extend some aspects of the law. He asked senators to consider a two-week continuation of the federal authority to track a “lone wolf” terrorism suspect not connected to a state sponsor and to conduct “roving” surveillance of a suspect, rather than of a phone number alone, to combat terrorists who frequently discard cellphones.
But Mr. Paul objected, and Mr. McConnell denounced from the Senate floor what he called “a campaign of demagoguery and disinformation” about the program.
Mr. McConnell then moved to a second option, a procedural move to take up the bill passed by the House, which he said the Senate would amend this week. It was unclear Sunday how many amendments, including any from Mr. Paul, would be considered and whether any could pass the Senate or be adopted by the House.
The House bill would overhaul the Patriot Act and scale back the bulk collection of phone records revealed by Mr. Snowden. Under the provisions of the House bill, sweeps that had operated under the guise of so-called national security letters issued by the F.B.I. would end. The data would instead be stored by the phone companies and could be retrieved by intelligence agencies only after approval of the Foreign Intelligence Surveillance Act court.
President Obama and his director of national intelligence, James R. Clapper Jr., have made dire warnings in recent days about the perils of letting the law expire and called for immediate approval of a surveillance bill passed by the House. “This shouldn’t and can’t be about politics,” Mr. Obama said in his weekly radio address. “This is a matter of national security.”
The C.I.A. director, John O. Brennan, echoed the president on Sunday during an interview on the CBS show “Face the Nation,” saying there had “been a little too much political grandstanding” and adding that “these tools are important to American lives.”
Speaker John A. Boehner, Republican of Ohio, also urged the Senate to act, citing the threat of groups like the Islamic State. “Al Qaeda, ISIL and other terrorists around the globe continue to plot attacks on America and our allies,” Mr. Boehner said in a statement. “Anyone who is satisfied with letting this critical intelligence capability go dark isn’t taking the terrorist threat seriously.”
Mr. McConnell had sought to get a series of short-term extensions passed so that Congress could continue to work on a compromise — like giving the phone companies more time to adapt to the new law — but that effort collapsed under the objections of Mr. Paul and two Democrats, Ron Wyden of Oregon and Martin Heinrich of New Mexico. Further, members of the House rejected extending the current law, given the wide support for their bill.
After a middle-of-the-night vote for a short-term extension failed on the Saturday before Memorial Day, senators left for a weeklong recess as the clock ticked. Senate Republican leaders sought a compromise that would make a new bill acceptable to both hawkish lawmakers and Mr. Paul. “I still have deep concerns,” said Senator Susan Collins, Republican of Maine.
Over the week, negotiators on the House and Senate Intelligence Committees had laid out a series of options to revise the bipartisan USA Freedom Act, including the addition of a certification process to ensure that the technology is ready to move metadata storage to the phone companies and allowing for a longer transition to phone company storage of the data. The House negotiators were skeptical of all efforts.
Democrats were critical of Mr. McConnell on Sunday night. “The job of the leader is to have a plan,” Senator Harry Reid of Nevada said on the Senate floor. “In this case, it is clear the majority leader simply didn’t have a plan.”
A version of this article appears in print on June 1, 2015, on page A1 of the New York edition with the headline: Senate, in Reversal, Turns Toward Limits on Spying.