A part of the Patriot Act that the National Security Agency relied on to collect bulk intelligence on Americans expired just after midnight on Monday—and that's just fine. This country is not any less safe; it may be a little more so, if one factors in the advantages of forcing the N.S.A. to think rationally about the benefits and the harms of what it's doing, and how it should expend its resources. And Rand Paul, the Republican senator from Kentucky, deserves some credit for that. The only pity is that the measure, known as Section 215, won't simply stay dead.

The Senate will almost certainly pass some version of a compromise replacement bill, known as the U.S.A. Freedom Act, in the next day or two, which will allow the collection of data to continue, with new limits. A version of the Freedom Act has already passed the House 338-88, and it has certain qualities that recommend it. It was crafted, in large part, by legislators, like Patrick Leahy, of Vermont, who care strongly about civil liberties and have acted with good will to find a bipartisan way to balance those concerns with national security. (Paul and others who prefer the expiration of Section 215 argue that the new bill still gives the government too much leeway in searching phone records, which would be retained by private companies.) And yet the behavior of the Republicans in the Senate, particularly of the Majority Leader Mitch McConnell, in the past few weeks, has not only been an insult to the efforts of Leahy and others, it has thrown the premise of the compromise—that with some tweaks, the N.S.A. can be trusted with broad access to Americans' phone records and metadata—into doubt. Paul may have stage-managed the measure's expiration, but it was McConnell who forfeited Section 215 of the Patriot Act.

The Freedom Act could have passed more than a week ago, leaving no gap in the N.S.A.'s capabilities, if McConnell had not pushed, instead, for what he insisted on calling a "clean" renewal of Section 215. (Two other provisions had June 1st sunsets, too, but they are rarely used.) McConnell did so utterly unchastened by a Second Circuit Court of Appeals ruling last month, which said that the law did not actually allow the N.S.A. to do the things that the agency did in its name. Section 215 says that the N.S.A. can, after going to the Foreign Intelligence Surveillance Act court, compel the production of "tangible things" that are "relevant" to an "authorized investigation." As the Second Circuit found, the N.S.A. treated the entire universe of American phone records as one tangible thing, broadened relevance to the point of meaninglessness, and ignored the limitations that the law placed on what counted as a specific investigation, to the point that “the government effectively argues that there is only one enormous ‘anti-terrorism’ investigation, and that any records that might ever be of use in developing any aspect of that investigation are relevant to the overall counterterrorism effort.” In other words, the N.S.A., despite having enormous legitimate powers, was breaking the law. McConnell seemed outraged that anyone should suggest that it stop.

McConnell also seemed oblivious to the public's unhappiness about bulk collection, the government's own conclusion that the practice had not actually foiled any terrorist plots, and to arguments from his own party's libertarian faction. Paul had argued that the language of the Freedom Act is still too expansive and leaves potential for abuse that Congress lacks the will to prevent—and McConnell has done his best to prove him right.

And so, just before the Memorial Day break, when the Senate voted on whether the Freedom Act could come to the floor—the kind of move that requires sixty votes in our strange Senate—McConnell pressured just enough senators to make it fail, 57-42. His preference, a two-month extension of Section 215, then failed by a much wider margin, 45-54. McConnell, who is known as an expert vote-counter and parliamentarian, was uncharacteristically dismayed. He seems to have thought that fear alone would force the renewal he wanted. Into the early morning hours on Saturday of the holiday weekend, he tried a series of shorter extensions—a week, four days, two days, one day. They all failed. He then called the Senate back this past Sunday, but, given Senate rules, that wasn't enough time. That is why Section 215 expired. Paul didn't even need to try hard to push things past the June 1st deadline.

Speaking from the floor on Sunday evening, Paul said that the Freedom Act would pass and that, despite his doubts, he would "look for silver linings." Earlier, John McCain, one of Paul’s strongest Republican critics on national security, tried to use procedural maneuvers to prevent Paul from speaking. According to the Times, McCain later said that Paul, who is running for the Republican Presidential nomination, "would be the worst candidate we could put forward." (One of McCain’s allies, Lindsey Graham, who announced his own candidacy on Monday, was recently seen on camera rolling his eyes while Paul spoke.) But for all his grandstanding—he has been selling anti-N.S.A. T-shirts, and tweeting up a “Stand with Rand” storm—Paul had sensible things to say in that speech. One of them was a reminder that, if the government has suspicions, it has plenty of ways to get a real warrant without collecting everyone's phone records: “I think we spend so much money on people for whom there is no suspicion that we don't have enough time and money left to go after the people who would actually harm us.” He added, "The people who argue that the world will end and we will be overrun by jihadists tonight are trying to use fear. They want to take just a little bit of your liberty but they get it by making you afraid.” Ron Wyden, the Democratic senator from Oregon, who has been a leader in trying to get Congress to fulfill its intelligence-oversight responsibilities, picked up on the theme of trust in his own speech on Sunday evening, in which he pointed out that James Clapper, the director of National Intelligence, lied to him in a Senate hearing when asked about bulk collection—even though Wyden had told him in advance that he'd ask the question.

McConnell used his time on the floor on Sunday to rail against a supposed "campaign of demagoguery and disinformation." The Times reported that he was looking at Paul; that was the wrong direction. And McConnell is not done yet. He said that he hoped to introduce some "modest amendments" to the Freedom Act in the next day or two. But enough compromises have already been made, and the only amendments there ought to be room for are ones that McConnell wouldn't like.

McConnell did say one thing that was on point. The debate in and out of Congress, without which our phone records would be silently filling up the N.S.A.'s databases, was only taking place, he said, "in the wake of the unlawful actions of Edward Snowden," the former N.S.A. contractor who revealed the existence of the program. That is true, and it is entirely to Snowden's credit.