Sen. Dean Heller blew it.

It’s hard to imagine a more terrible way for a moderate like the Nevada Republican to handle an extremely unpopular piece of legislation like the Senate health care bill, which went down in flames early Friday.

At just about every turn over the past few weeks, the vulnerable senator who faces re-election next year danced haphazardly from one position to the other and everywhere in between. By enthusiastically embracing criticisms of the bill while simultaneously voting to advance it several times, Heller may have seriously damaged his reputation among liberals and conservatives.

Unlike other GOP senators who expressed concern about repealing too much of Obamacare, such as Rob Portman of Ohio and Shelley Moore Capito of West Virginia, Heller had put on a show back home. In a widely televised June press conference alongside popular Nevada Gov. Brian Sandoval (R), Heller sharply criticized an initial version of the Senate GOP health care bill, known as the Better Care Reconciliation Act.

“I cannot support a piece of legislation that takes insurance away from tens of millions of Americans and hundreds of thousands of Nevadans,” he said.

Chip Somodevilla/Getty Images Sen. Dean Heller was all over the place in regard to health care legislation the past few weeks.

To his credit, Heller joined nine other Republicans in voting down that bill on Tuesday. But when Republicans drew up a more narrowly tailored version of the legislation, known as the Health Care Freedom Act, Heller was all over the place.

“Overall I think I’d support it,” he said Wednesday morning, before shifting gears the next day to “undecided.”

In the end, Heller on Friday morning voted for a bill that, according to the Congressional Budget Office, would have left 16 million fewer Americans with health coverage and raised premiums by 20 percent over the next 10 years. He also broke with Sandoval and nine other governors who declared their opposition to the bill just hours before the vote.

Some of Heller’s legislative maneuvering designed to insulate him from criticism back home also backfired. A symbolic amendment he introduced that expressed the Senate’s support for Medicaid, while also repealing Obamacare, was voted down 10-90 ― the only such bipartisan vote on a health care measure all week.

It was not legally binding and hence little more than a messaging tactic. Heller’s office made sure to tout the measure in a press release titled, “Heller on Senate Floor: Health Care Reform Cannot be Balanced on the Backs of Nevada’s Low-Income Families.”

In deciding how to vote on the health care bill, Heller arguably faced a more difficult political calculus than other GOP moderates, including Sens. Susan Collins of Maine and Lisa Murkowski of Alaska. Unlike the others, Heller is likely to face a strong primary challenge from his right. And he has already been threatened by ads from a group supportive of President Donald Trump.

Meanwhile, Rep. Jacky Rosen (D-Nev.), who’s running for Heller’s seat, wasted no time ripping into him for his vote on Friday.

“No politician from our state has ever been more dishonest about their intentions, more misleading about their position or more disingenuous to their constituents,” Rosen said in a statement. “This was the biggest broken political promise in modern Nevada history.”