Senator John McCain (R-AZ) looks on during a press conference about his resistance to the so-called "Skinny Repeal" of the Affordable Care Act on Capitol Hill in Washington, U.S., July 27, 2017. REUTERS/Aaron P. Bernstein Aaron P. Bernstein/REUTERS

Sen. John McCain was the final vote that killed a Republican health care bill last week that could have taken health care away from millions. McCain, a Republican, surprised all of Congress and defied his party in a bit of late night theatrics reminiscent of the West Wing.

McCain was one of only three Republicans who defied their party. McCain joined Sen. Susan Collins of Maine and Sen. Lisa Murkowski of Alaska who opposed the bill all along. They caught heat from their own party, including bully pulpit President Donald Trump’s Twitter.

The move boosted McCain’s popularity, just not with Republicans.

READ: John McCain Takes Heat For Returning To Capitol Hill For Health Care Vote

In a new Quinnipiac University poll released Wednesday, McCain is seen favorably by 74 percent of Democrats and only 39 percent of Republicans. McCain is seen unfavorably by just 18 percent of Democrats, but 49 percent of Republicans. McCain did well with independents in the poll too, 60 percent of them viewed him favorably while 28 percent of them viewed him unfavorably.

The poll surveyed 1,125 voters nationwide and the poll had a margin of error of 3.4 percent. The voters were polled by live callers, and they called both landlines and cell phones.

McCain, 80, was diagnosed with an aggressive form of brain cancer last month. McCain turned heads when he decided to fly from his home state of Arizona to Washington D.C. days after the diagnosis to vote yes in a preliminary motion to proceed to allow discussion on the several versions of Republican health care plans.

The eventual bill that came before the Senate was called a “skinny repeal.” It tore out certain parts of the Affordable Care Act, also known as Obamacare, such as the individual mandate, while leaving in place most of the overall framework of the current health care landscape. It was the compromise reached to pull in moderate Republicans who didn’t want to gut Medicaid expansions like some of the previous iterations of the bill, and the conservative wing of the party who wanted a full repeal.

The plan for Republicans was to pass the skinny repeal to move the ball down the field and then conference with the House, which passed their own version of the bill earlier this summer and reconcile the two bills before handing it off to Trump who was ready to sign anything passed by the Republicans.

READ: How Did Cindy McCain Land Trump Administration Job?

Because the bill was being considered under budget reconciliation, it allowed only certain measures in whatever bill could be passed, but also meant that the bill only needed a simple majority of 51 votes to pass as opposed to the customary 60 votes. Republican Senate Majority Leader Mitch McConnell has 52 Republican senators and could only afford to lose two. A 50-50 tie is broken by the vice president.

Collins and Murkowski had long opposed Republican health care efforts because they aimed to take away funding for Planned Parenthood, had Medicaid cuts and the process of writing the bills was very secretive. McCain joined the women at the eleventh hour to the delight of Democrats, and consternation of Republicans.