Justin Miller/Getty

How John McCain—John McCain!—became Obamacare’s savior.

Since Donald Trump assumed the presidency on January 20, three has been the magic number for Democrats—the number of Republican senators they would need to block a reconciliation-friendly GOP health care reform plan. In the final days and hours of the Senate’s attempt to repeal Obamacare, confidence was high that Maine’s Susan Collins and Alaska’s Lisa Murkowski were going to vote “no.” But who would the third be? The prevailing assumption was that it would be someone representing a state that expanded Medicaid under Obamacare, like West Virginia’s Shelley Moore Capito or Ohio’s Rob Portman, or a conservative who felt that the legislation preserved too much of Obamacare, like Kentucky’s Rand Paul or Utah’s Mike Lee.

One person who was rarely mentioned? Arizona’s John McCain. Despite McCain’s rapidly fading reputation for being a maverick, he’s not known as a health care wonk or a lawmaker who cares about preserving social welfare programs in general. And yet it was a smiling McCainplaying coy with both reporters and his colleagues—who ultimately killed the bill early Friday morning.

The final hours of the Senate’s shameful attempt at repealing Obamacare were fittingly absurd. The bill wasn’t made public until 10pm. Many Republicans, like McCain’s BFF Lindsey Graham, had already slammed it as a “disaster.” Leadership was spinning it as little more than a procedural step to move on to conference committee, but it had all the makings of a fait accompli.

When it became clear that McCain might be voting no, things got really weird. The Senate floor turned into a scene of furious lobbying, with Vice President Mike Pence and Majority Leader Mitch McConnell trying to bring either Murkowski or McCain back in the fold. No one knew how McCain would vote, so every small gesture—a hug, a smile—became a sign. It would have been silly, if not for the stakes.

When McCain finally cast his “no” vote, Democrats broke into spontaneous and brief applause. But how did McCain become health care’s savior?

The answer might lie in the speech he gave when he returned to the Senate on Wednesday. He tore into Republican leadership for “coming up with a proposal behind closed doors in consultation with the administration, then springing it on skeptical members, trying to convince them that it was better than nothing.” He added, “I don’t think that’s going to work in the end, and it probably shouldn’t.”

McCain returned to that institutionalist line in his statement after the “no” vote, saying, “We must now return to the correct way of legislating.” Yet the only reason we got to this point is because McCain voted to override the correct way of legislating earlier in the week. In the most charitable reading of what the hell McCain was up to, he allowed the motion to proceed so he could ultimately kill the bill in the name of protesting the process. And, perhaps, giving a huge middle finger to Mitch McConnell and Donald Trump.