The USA Freedom Act, a modest but significant surveillance reform bill, is set to pass the House of Representatives by a large margin today. Yet the law still faces an uphill battle in the Senate, thanks largely to the intransigence of Senate Majority Leader Mitch McConnell (R‑Ky.), who is plowing ahead with a plan to reauthorize controversial provisions of the Patriot Act — including the authority behind NSA’s massive telephone records database. And in the wake of a recent federal appeals court decision holding that program unlawful, McConnell’s stubborn opposition to reform has gone from misguided to downright illogical, even on McConnell’s own terms.

When former NSA contractor Edward Snowden first revealed, nearly two years ago, that the spy agency had been indiscriminately vacuuming up the telephone records of millions of Americans, legal experts were stunned at the audacious legal justification the government offered for the program.

A provision of the Patriot Act, known as section 215, empowers the FBI to obtain business records that are “relevant” to an authorized national security investigation. But the government had secretly convinced a court to interpret this power in a shockingly broad way: Everyone’s telephone records, the feds argued, could be “relevant” to counterterrorism investigations, because having the entire database would make it easier to search for the tiny fraction of phone records that were truly related to a given investigation.

Even one of the Patriot Act’s authors, Rep. James Sensenbrenner of Wisconsin, denounced the program as a “gross invasion of privacy” that went far beyond what Congress had intended to authorize.

The looming expiration of section 215, which will sunset at the end of the month unless reauthorized, has set the stage for a struggle between two camps. On one side is a broad, bipartisan coalition of legislators, civil liberties groups, and technology companies backing the USA Freedom Act, reform legislation set for a vote in the House of Representatives next week. The law would bar the use of several related spying authorities, including 215, for indiscriminate “bulk” data collection, and impose new transparency requirements to ensure that no court could again expand spying powers behind a veil of secrecy.

On the other side is a camp led by Mitch McConnell, who has proposed legislation extending the government’s spying powers without any new limitations or safeguards.

Even before Thursday, McConnell’s case against reform was grounded in an almost surreal denial of the facts about the NSA program. McConnell has insisted that the NSA’s telephone program represents “one of our nation’s critical capabilities to gather significant intelligence on terrorist threats.” Yet two independent expert review groups have thoroughly debunked that claim. A Surveillance Review Group appointed by the president found that information from the NSA database “was not essential to preventing attacks,” and concluded that there was “no sufficient justification for allowing the government itself to collect and store bulk telephony meta-data.”

Those findings were echoed by the Privacy and Civil Liberties Oversight Board, which was unable to find “a single instance involving a threat to the United States in which the telephone records program made a concrete difference in the outcome of a counterterrorism investigation.” Rather, the Board wrote, “the information supplied by the NSA through Section 215 offered no unique value, but simply mirrored or corroborated information that the FBI obtained independently using other means.”

McConnell’s arguments also put him at odds with the leadership of the intelligence community. The majority leader has claimed that ending bulk collection would be tantamount to “tying our hands behind our backs,” but Director of National Intelligence James Clapper has endorsed the Freedom Act as “a reasonable compromise that enhances privacy and civil liberties and increases transparency” without hampering the government’s “operational needs.”

Perhaps most bizarrely, McConnell has even argued that the Freedom Act’s approach — creating a streamlined mechanism for the government to obtain specific records quickly from telephone companies — would irresponsibly leave our private data in the hands of “corporate employees with uncertain supervision and protocols.” McConnell, in other words, appears to be unaware that telephone companies already keep telephone records, whether they send copies to the NSA or not.

Thursday’s decision by the Court of Appeals for the Second Circuit, however, should transform even McConnell into a proponent of reform. The court utterly repudiated the government’s unfettered interpretation of section 215, noting that the “relevance” standard, while broad, has a long history in ordinary criminal investigations, and has never been understood to permit the government to obtain entire databases of sensitive personal information on the theory that a tiny fraction might prove useful in the future. Otherwise, not just intelligence agencies, but ordinary police and prosecutors would have free rein to engage in similar fishing expeditions through private records, employing that same standard of “relevance.”

The effect of this common sense ruling is that simply reauthorizing section 215 no longer guarantees that the NSA program can continue. Rather, lawmakers who continue to believe — in defiance of all the evidence — that the program is a vital security tool should be motivated by their own logic to support the USA Freedom Act.

If the Second Circuit’s ruling is upheld, after all, then even if section 215 is extended, the government will be forced to rely on narrower orders for specific records, rather than gobbling up entire databases. The only question is whether NSA will also have the benefit of the Freedom Act’s streamlined mechanism for searching and obtaining those records more quickly.

Perhaps someone should ask Mitch McConnell why he’s so determined to tie the intelligence community’s hands.