WASHINGTON — Senator Dean Heller of Nevada, perhaps the most vulnerable Republican facing re-election in 2018, said Friday that he would not support the Senate health care overhaul as written, dealing a serious blow to his party’s attempt to repeal the Affordable Care Act just days before a showdown vote.

Using remarkably harsh language, Mr. Heller, who is seen as a pivotal swing vote, denounced the Senate-drafted bill in terms that Democrats swiftly seized on. He said the measure would deprive millions of health care and do nothing to lower insurance premiums.

“I cannot support a piece of legislation that takes insurance away from tens of millions of Americans,” he said at a news conference in Las Vegas, standing next to Nevada’s Republican governor, Brian Sandoval, who accepted federal funding under the Affordable Care Act to expand Medicaid.

After vowing for the last seven years to tear up what they call Obamacare, congressional Republicans and President Trump are under pressure from their conservative base to fulfill their campaign promises. But Republican lawmakers in swing states face an excruciating choice: risk angering their grass-roots supporters by walking away from the repeal effort or expose themselves to Democratic attacks by pushing through a bill that is deeply unpopular, according to polls.