WASHINGTON – Just before he cast the deciding vote on the Senate’s latest health care repeal bill, Sen. John McCain turned and whispered something in Sen. Amy Klobuchar’s ear: “I’m going to vote ‘no.’ ”

It was past 1 a.m. Friday and weary senators had gathered in the chamber, waiting for the roll call. Vice President Mike Pence was walking around the Senate floor, ready to break the anticipated 50-50 tie if Republican Sens. Lisa Murkowski and Susan Collins joined every Senate Democrat in voting against the so-called “skinny repeal” of select parts of the Affordable Care Act.

“Tensions were high; people had been up late into the night. No one quite knew what he was going to do,” Klobuchar said of McCain.

Then, Klobuchar said, he “came over to our group and I gave him a hug and he whispered, ‘I’m voting no.’ ”

McCain had doggedly avoided tipping his hand. Although he’d railed against the process that created the latest Obamacare repeal bill — crafted behind closed doors and pushed to a vote without any real debate — most assumed he would cast a “yes” vote, hoping the bill could be fixed in conference committee.

“Wait for the show,” McCain told reporters as he walked toward the Senate chamber , his face bruised and bloodied from recent surgery.

After tipping off Klobuchar and her colleagues, McCain glanced up at the reporters hanging over the Senate press gallery railing overhead, watching avidly.

“I hope they don’t read lips,” McCain joked.

After a while, Pence pulled McCain into the hall and Klobuchar’s cellphone started blowing up with texts from reporters eager to find out what McCain had said to her.

A few minutes later, after the vote was underway, McCain returned to the chamber. C-SPAN footage shows Klobuchar rising to her feet in anticipation, nudging her colleagues that something extraordinary was about to happen. McCain stretched out his arm and gave the bill a thumbs-down, and it went down to defeat 49-51.

The Arizona Republican had left the hospital, where he is undergoing treatment for a newly diagnosed and highly aggressive form of brain cancer, to return to work. A few days earlier, he delivered an impassioned speech decrying the way the Senate’s repeal-and-replace bills had been slapped together and calling for a return to bipartisan deliberation on health care. The vote, Klobuchar said, emphasized his message that “the Senate needs to start being the Senate, and not some sort of boxing ring.”

With all eyes focused on McCain, Klobuchar also took a moment to remind Capitol reporters that there were two other Republicans who stopped the repeal in its tracks — two women, Murkowski and Collins, who had been steadfast in their opposition from the start.

As Senate Minority Leader Chuck Schumer , D-N.Y., heaped praise on McCain, calling him “a war hero” who “had courage and does the right thing,” Klobuchar added: “Can you also not forget the two women senators who were there from the beginning?”

The skinny repeal bill was a “carcass,” Klobuchar said afterward, which wouldn’t have done anything to fix the Affordable Care Act’s problems with rising premiums and shaky insurance markets.

“John McCain and I are good friends. We go back quite a ways and he has invited me on many of his adventures around the world,” Klobuchar said, “including to Vietnam, where we stood in front of the cell where he was held for over five years. When you see something like that, you know what patriotism is all about and that’s what he showed us last night.”