Jonathan Ernst/Reuters

In the wee hours of Saturday morning, the U.S. Senate played host to a moment that took mass surveillance on the phone records of Americans from outrage to farce.

The NSA’s phone dragnet had already been declared illegal.

Earlier this month, a federal appeals court ruled that while the surveillance agency has long claimed to be acting in accordance with Section 215 of the Patriot Act, the text of that law in fact authorizes no such program. The Obama Administration has been executing a policy that the legislature never passed into being.

But the law that doesn’t even authorize the program is set to expire at the end of the month. And so the court reasoned that Congress could let it expire or vote to change it. For this reason, the court declined to issue an order shutting the program down.

President Obama didn’t shut the program down either. One might think the illegality of its ongoing operations would bother him, but he’s effectively punted to Congress too.

Days ago, the House of Representatives acted: they voted overwhelmingly, 338 to 88, “to end the National Security Agency's mass collection of phone records from millions of Americans with no ties to terrorism,” passing the USA Freedom Act, an effort “to rein in NSA surveillance while renewing key sections of the... Patriot Act.” The bill divided civil libertarians, some of whom thought it didn’t go far enough because the government could still access bulk data held by phone companies.

That brings us to the wee hours of Saturday morning. “After vigorous debate and intense last-minute pressure by Republican leaders, the Senate on Saturday rejected legislation that would end the federal government’s bulk collection of phone records,” The New York Times reports. “With the death of that measure — passed overwhelmingly in the House — senators then scrambled to hastily pass a short-term measure to keep the program from going dark when it expires June 1 but failed.”

The outcome is good for civil libertarians: the House is in recess; barring the unexpected, the phone dragnet will end June 1, when key provisions of the Patriot Act expire. And Senator Rand Paul seems to deserve extra credit for that outcome: “The measure failed in the Senate 57 to 42, with 12 Republicans voting for it, shortly after midnight because Mr. Paul, a candidate for the White House, dragged the procedure out as he promised to do in fund-raising tweets and emails.”

That happy outcome aside, there’s a farcical aspect to the process.

There’s a program that Congress never approved. The House weirdly had to vote to get rid of it. They did so. But the Senate had to follow suit, voting to get rid of the program that they never passed. And they failed even though 57 Senators were in favor. So an illegal program will continue, despite majorities in both houses of Congress casting votes to end what they never began. And the only reason their failure doesn’t matter is that legal provisions that don’t in fact authorize the program will soon expire. And then it will end. What a strange democracy we’ve got.

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