Senate Majority Leader Mitch McConnell (R-Ky.) walks to the Senate floor May 31. (Drew Angerer/Getty Images)

The legal authority for several national security programs expired at midnight Sunday and will not be renewed for at least two days, after Senate Republicans leaders were unable to maneuver around Sen. Rand Paul (R-Ky.), a presidential candidate who followed through on a pledge to block an extension of the law.

The Senate closed a rare Sunday session without approving the only legislation that would have averted a lapse in the authority — a House-passed bill that would provide for an orderly transition away from the most controversial program authorized under the current law: the National Security Agency’s bulk collection of call records from telephone companies.

Spurred by the impending deadline, senators voted overwhelmingly, 77 to 17, to proceed with the measure Sunday, a week after they didn’t act on it before starting a week-long recess. But Paul, under Senate rules, was able to delay final passage of the bill until at least Tuesday.

On Monday, House Majority Leader Kevin McCarthy (R-Calif.) reiterated his preference to have the Senate pass the already-approved House bill, without any amendments, so that it can be sent to President Obama’s desk quickly for its enactment into law. “I still think the best advice for them is to pass our bill,” McCarthy told reporters Monday morning. He declined several opportunities to say whether he would accept any changes by the Senate, which would require the House to reconsider the anti-terror legislation.

Roving wiretaps, the NSA phone records collection and the "lone wolf" provision are some of the most controversial parts of the Patriot Act. PostTV breaks down what you need to know about these sections. (Jorge Ribas/The Washington Post)

“The best option for the protection of this country is to pass our bill,” he said.

Immediately after the vote, Paul took the floor and began his remarks by conceding that the measure he opposes would eventually pass. But after he left the floor, he declared victory because the House bill, known as the USA Freedom Act, would end the government’s collection of phone records.

“The point we wanted to make is, we can still catch terrorists using the Constitution,” he said. “I’m supportive of the part that ends bulk collection by the government. My concern is that we might be exchanging bulk collection by the government [with] bulk collection by the phone companies.”

During an early-morning session on May 23, Paul used his powers under Senate rules to foil Majority Leader Mitch McConnell’s efforts to extend the existing authority for 60 days, a week, or even one day. On Sunday, he objected to a proposal from McConnell (R-Ky.) that would have extended less-controversial surveillance programs while the debate about the NSA telephone program continued.

That prompted a fiery floor speech from McConnell, who accused Paul and other opponents of the NSA program of engaging in a “campaign of demagoguery and disinformation” prompted by the “illegal actions” of former NSA contractor Edward Snow­den.

“We shouldn’t be disarming unilaterally as our enemies grow more sophisticated and aggressive,” said McConnell, who has endorsed Paul for president and looked directly at Paul at times as he delivered his remarks. He later made procedural moves to prevent Paul from offering amendments he has sought to the pending bill.

Photographers and reporters crowd an elevator off the Senate floor as they cover senators on a rare working Sunday on Capitol Hill. (Mike Theiler/Reuters)

The NSA’s collection of phone records began in secret after the Sept. 11, 2001, attacks and was later authorized, also in secret, by a court under Section 215 of the USA Patriot Act — the provision that is set to expire. The continuation of the program and its justification were revealed in 2013 by Snowden.

Until Sunday, McConnell had resisted taking action on the House bill, arguing alongside other key Republican senators that it would not do enough to preserve necessary counterterrorism capabilities.

Those senators on Sunday pledged to amend the USA Freedom Act to provide further assurances that intelligence officials will have timely access to the phone records, even if they remain in private hands. If the bill is amended, it would go back to the House, whose leaders have resisted any suggestion that more changes are needed, further extending the lapse in authority.

House Speaker John A. Boehner (R-Ohio) on Sunday repeated calls for the Senate to pass the USA Freedom Act, which would provide for an orderly transition away from the bulk collection program and cleared the House earlier this month by an overwhelming vote of 338 to 88.

“Al-Qaeda, ISIL and other terrorists around the globe continue to plot attacks on America and our allies,” Boehner said, using an acronym for the Islamic State. “Anyone who is satisfied with letting this critical intelligence capability go dark isn’t taking the terrorist threat seriously. I’d urge the Senate to pass the bipartisan USA Freedom Act, and do so expeditiously.”

CIA Director John Brennan said Sunday that the expiring programs are “integral to making sure that we’re able to stop terrorists in their tracks.”

“I think that there has been a little too much political grandstanding and crusading for ideological causes that have skewed the debate on this issue,” he said on CBS’s “Face the Nation.” “But these tools are important to American lives.”

Brennan said “terrorist elements” are watching Congress’s actions “very carefully” and are “looking for the seams to operate within.”

“This is something that we can’t afford to do right now, because if you look at the horrific terrorist attacks and violence that is being perpetrated around the globe, we need to keep our country safe,” he added.

After the Senate adjourned Sunday, White House press secretary Josh Earnest in a statement called on senators to “ensure this irresponsible lapse in authorities is as short-lived as possible.”

“On a matter as critical as our national security, individual senators must put aside their partisan motivations and act swiftly,” he said. “The American people deserve nothing less.”

The USA Freedom Act is the product of months of compromise between Republicans and Democrats, the administration and privacy groups. Under it, the NSA would stop gathering billions of call records — their times, dates and durations, but not their content. Instead, the phone companies would be required to adapt their systems so that they could be queried for records of specific terrorism suspects based on individual court orders. The bill also would renew other expiring investigative powers that the FBI says are critical.

But Paul, who wants the NSA program ended outright, and a handful of senators who prefer that the NSA program remain as is, effectively blocked action on the bill until Sunday. McConnell had counted on the impending deadline to force at least a short-term extension of the current law, but Paul and a few other senators blocked any stopgap.

On the Senate floor Sunday afternoon, Minority Leader Harry M. Reid (D-Nev.) lambasted McConnell for a lack of “strategy, planning and open lines of communication.”

Reid said the expiration of the Patriot Act provision can’t be blamed on Paul, who has long been an outspoken critic of overreach by the NSA. “We’re in this mess today because of the majority leader,” Reid said Sunday. “My friend from Kentucky simply didn’t have a plan. That’s why we’re here.”

Elizabeth Goitein, a national security expert at New York University Law School’s Brennan Center for Justice, said McConnell “badly overplayed his hand.”

“He gambled that he could wait until the last minute and ram through a short-term reauthorization of the Patriot Act, and he lost,” she said. “By the time he tried to backpedal and move the USA Freedom Act forward, it was too late.”

Some of the tools that are set to lapse are not controversial and have been renewed in the past, President Obama said in his radio address. They include the ability to seek a “roving wiretap” to keep up with suspected terrorists or spies who constantly switch out cellphones. Another power — never used — enables wiretaps on suspected “lone wolf” terrorists who cannot be directly tied to a terrorist group.

One of the most important, officials say, is Section 215. That authority permits the government to obtain all types of records on an individual as long as they are relevant to a foreign terrorism or espionage investigation.

Rep. Adam B. Schiff (Calif.), the top Democrat on the House Select Committee on Intelligence, said national security officials may be able to rely on “workarounds” to the lack of Section 215 authority in some cases but not others. “Unquestionably, there’s going to be a disruption in the capabilities,” he said, adding that the situation “won’t be optimal by any means.”

The USA Freedom Act also would end bulk collection of records under other national security authorities, including national security letters. It would require the Foreign Intelligence Surveillance Court, which meets in secret, to declassify significant legal decisions and provide for an advocate for the public’s privacy rights at the court, which generally hears only the government’s cases for a wiretap or other surveillance order. And it would grant technology companies more leeway to report on the scale of national security data requests.

The bill also contains a six-month transition period during which the NSA would work with phone companies to ensure that they can set up their systems to quickly search for records and send them to the agency.

Since last weekend, NSA wind-down teams were placed on a “hot standby,” which included contacting phone companies with a plan of action for shutting down the bulk collection. The actual shutdown time is about eight hours, officials said.

Paul Kane and Katie Zezima contributed to this report.