J. Scott Applewhite / AP

For the last two weeks, Mitch McConnell and Rand Paul have offered competing visions for balancing national security and civil liberties in the original post-9/11 anti-terror law, the USA Patriot Act. On Tuesday, both Kentucky Republicans lost.

Their defeat came at the hands of 67 fellow senators, who voted to endorse a compromise between their two visions and pass the USA Freedom Act—a bill that extends the Patriot Act while ending the NSA’s bulk collection of telephone metadata. The House approved that measure last month, and it now heads to President Obama’s desk for his signature.

The battle between McConnell and Paul was an awkward one, to say the least. The two are reluctant allies, and the establishment-friendly majority leader has endorsed Paul’s candidacy for the presidency despite trying to keep him out of the Senate five years ago. But they are miles apart when it comes to national security and foreign policy, and neither of them tried to paper over their differences over the Patriot Act. Paul has joined privacy advocates in criticizing the reforms in the Freedom Act as too weak, and he won a temporary victory Sunday night when his objections on the Senate floor forced the NSA to halt a trio of Patriot Act programs that expired at midnight.

But ultimately, a bipartisan consensus in favor of modifying—but not gutting—government spy programs held, and the Freedom Act passed after Paul had exhausted his ability to delay action in the Senate. The defeat was far more embarrassing to the hawkish McConnell, who found that 14 years after the terrorist attacks of September 11, his uncompromising view of government surveillance power is suddenly a minority position in the Republican Congress. McConnell tried repeatedly and in vain to extend the Patriot Act without revision, but each time he was thwarted by a coalition that demanded changes to the NSA program first exposed by Edward Snowden.

The final rebuke of the majority leader came on Tuesday afternoon, when he sought to amend the Freedom Act and send it back to the House. He did so in the face of warnings from the GOP leadership in the House that the changes wouldn’t fly there. Two of the amendments were of the face-saving variety; one would have given the NSA an additional six months to transition away from its data-collection program, while another would have required a certification that the phone companies—the new designated stewards of bulk metadata—were capable of collecting and retaining the data as intended. A third amendment was more controversial and would have weakened a provision creating a watchdog for the Foreign Intelligence Surveillance Court. The Senate rejected all three changes before passing the House bill on a 67-32 vote.

The version that passed on Tuesday was the same as the one McConnell defeated 10 days ago, before the Senate took a weeklong break, and before it allowed the expiring Patriot Act provisions to lapse. He reacted angrily on the Senate floor, denouncing Democrats and the Obama administration, which actually played little role in his fight with Paul. All the Freedom Act does, McConnell complained, was “take one more tool from those who defend liberty every day.”

Still, there was little doubt that he had miscalculated—both in assessing the broad support for a middle ground, and in Paul’s willingness to wage so aggressive—and politically advantageous—a battle on an issue central to his brand. Thanks in part to Snowden, Congress may have moved in Paul’s direction over the last few years, but it isn’t fully on board with his fight against the Patriot Act. The difference was that unlike McConnell, Paul knew he would eventually lose his fight. He just didn’t care.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.