WASHINGTON (AP/WCCO) — Sen. John McCain looked like he was going to save GOP health care efforts when he returned to the Capitol earlier this week.

The longtime Arizona senator had just been diagnosed with brain cancer. But he came back to the Senate in time to cast a decisive vote in favor of opening debate on GOP legislation to repeal and replace “Obamacare.”

Instead McCain stunned his party when the final vote was at hand early Friday morning. He voted “no” and killed the legislation. And in the process he dealt what looks like a death blow to the Republican Party’s years of promises to get rid of Barack Obama’s health law.

So the 80-year-old McCain was a maverick to the end — defying President Donald Trump and Senate GOP leaders.

McCain is returning to Arizona to begin radiation and chemotherapy.

In a statement Friday, his office said he will undergo further treatment at the Mayo Clinic in Phoenix while maintaining his work schedule. The senator, who won a sixth term last year, plans to return to Washington at the end of Congress’ August recess.

McCain had a blood clot removed about his left eye earlier this month and was diagnosed with glioblastoma, an aggressive type of brain cancer.

Sen. Amy Klobuchar of Minnesota told reports on Friday afternoon that McCain told her how he would vote shortly beforehand.

“Senator McCain came over and he gave me a hug and whispered ‘I’m going to vote no,’” Klobuchar said.

Congress has not yet determined what its next steps on health care will be, but Klobuchar said she hopes McCain can inspire more bipartisanship when it comes to health care reform.

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)