WASHINGTON — Nevada Republican Dean Heller became the fifth GOP senator to declare his opposition to the party’s banner legislation to scuttle much of Barack Obama’s health care overhaul on Friday, more than enough to sink the measure and deliver a stinging rebuke to President Donald Trump unless some of them can be brought aboard.

Echoing the other four, Heller said he opposes the measure “in this form” but does not rule out backing a version that is changed to his liking. Senate Majority Leader Mitch McConnell, R-Ky., has said he’s willing to alter the measure to attract support, and next week promises plenty of back-room bargaining as he tries pushing a final package through his chamber.

Nonetheless, Heller’s announcement underscores the scant margin of error Republican leaders must deal with. Facing unanimous Democratic opposition, McConnell can afford to lose just two of the 52 GOP senators and still prevail.

Besides the five who’ve announced outright opposition, several other GOP senators — conservatives and moderates — have declined to commit to the new overhaul. The measure resembles legislation the House approved last month that the nonpartisan Congressional Budget Office said would mean 23 million additional uninsured people within a decade and that recent polling shows is viewed favorably by only around 1 in 4 Americans.

Heller, facing a competitive re-election battle next year, said he was opposing the legislation because of the cuts it would make in Medicaid. The federal-state program provides health care to the poor, disabled and many nursing home patients.

The Senate bill would also erase the tax penalties Obama’s 2010 law imposes on people who don’t purchase insurance. It would allow insurers to cover fewer benefits and repeal tax boosts on wealthier people that help finance the statute’s expanded coverage.

The Senate legislation would phase out extra federal money Nevada and 30 other states receive for expanding Medicaid to additional low earners. It would also slap annual spending caps on the overall Medicaid program, which since its inception in 1965 has provided states with unlimited money to cover eligible costs.

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

Trump has spoken favorably about both the House-passed bill and the Senate version unveiled this week, though he declared several times as he ramped up his campaign for the presidency that he would not cut Medicaid.

Heller said that to win his vote, GOP leaders would have to “protect Medicaid expansion states” from the bill’s current cuts.

“It’s going to be very difficult to get me to a yes,” he said, noting that conservative Republican senators would likely be reluctant to add spending back to the measure.

Heller spoke at a news conference in Las Vegas with Nevada Gov. Brian Sandoval, a Republican who has also assailed the House and Senate health care bills for cutting Medicaid. The state has added 200,000 more people to its program under the Obama overhaul.

READ NEXT: Another Senate Republican defects on health bill

Sandoval said the Senate bill “is something that needs to change.” It would be politically difficult for Heller to take a different stance on the measure from the popular Sandoval.

Heller got an opponent for next year when first-year Democratic Rep. Jacky Rosen announced this week she would seek his Senate seat.

Just hours after McConnell released the 142-page legislation on Thursday, four conservatives said they opposed it. They were Sens. Ron Johnson of Wisconsin, Mike Lee of Utah, Rand Paul of Kentucky and Ted Cruz of Texas.

Underscoring the sensitivity of the bill, Sen. Joni Ernst, R-Iowa, who has not suggested she opposes the measure, declined to comment on its components when asked at a news conference Friday.

“It was just released yesterday. So, we have 142 pages to go through,” she said.

Asked about the bill’s impact on Medicaid insurance coverage for lower-income Iowans, Ernst said, “I wouldn’t say they are losing it.” Iowa opted to expand, and has added more than 150,000 people to its rolls since 2014.

READ NEXT: GOP senator warns against rushed vote on health care bill

Under special rules McConnell is using that will block Democrats from using a filibuster to kill the bill, the legislation cannot include provisions that make policy changes that don’t primarily affect the budget. The Senate parliamentarian will make that decision.

Democrats hope to use those rules to erase some language from the bill, including a section barring consumers from using the measure’s health care tax credits to buy insurance that covers abortions.

Realizing they’re outnumbered, Democrats and their liberal allies were planning events around the U.S. over the next few days aimed at building public opposition to the bill.

In one instance, Sen. Bernie Sanders, I-Vt., and MoveOn.org were planning weekend rallies in Pennsylvania, Ohio and West Virginia. Each state has expanded Medicaid and has a GOP senator.

Regina Garcia Cano reported from Las Vegas. Associated Press writer Thomas Beaumont in Des Moines, Iowa, contributed to this report.