Sen. Bernie Sanders gave a shout out to Sen. John McCain at a rally Friday to support a government-run healthcare system, saying he wished that the Senate's other Republicans lawmakers were more like the stubborn Arizonan.

"Thank you, John McCain," Sanders, the Senate's only avowed socialist and a Vermont independent, said at a San Francisco rally hosted by National Nurses United, a leftist union. The comment drew a tepid response from the crowd.

He pointed to McCain's co-authoring the McCain-Feingold campaign finance reform legislation and his opposition to a separate GOP Obamacare rollback earlier this summer. McCain returned to Washington after having surgery for brain cancer in July to cast the deciding vote against a "skinny repeal" plan that would have eliminated parts of Obamacare.

"Over the years, he has shown considerable courage," Sanders said.

The comment came about two hours after McCain announced he would vote against the Graham-Cassidy Obamacare overhaul bill, the last-ditch effort by Republicans to roll back the Affordable Care Act. McCain's opposition was a severe blow to the Senate GOP's efforts to get 50 votes to pass the legislation. The rules for using reconciliation, which allow the Senate to pass bills with only 51 votes instead of the 60 needed to break a filibuster, expire on Sept. 30.