House Republican leaders scrambled unsuccessfully Thursday evening to muster enough votes to bring a health-care bill to the floor this week, after the latest changes intensified resistance among some moderates and key industry players.

The compromise that moderate Rep. Tom MacArthur (R-N.J.) forged with the conservative House Freedom Caucus brought the party closer to unwinding the 2010 Affordable Care Act, giving it more support than it had when it abruptly pulled the measure last month from a planned floor vote.

But shortly after 10 p.m., leaders determined that they still lacked enough backing to pass it. House Majority Leader Kevin McCarthy (R-Calif.) told reporters that “we’re still educating members” on the latest draft.

MacArthur’s amendment would allow states to opt out of two of the law’s central provisions: requiring coverage for “essential health benefits” such as maternity and preventive care; and barring insurers from charging people with certain preexisting medical conditions more than others in their general insurance pool.

The changes run directly counter to what President Trump pledged during last year’s campaign and since his election, and many lawmakers from swing districts remain hesitant to endorse them. Both Affordable Care Act provisions enjoy significant public support, and the amendment does nothing to alter the roughly $880 billion in Medicaid cuts outlined in the GOP’s American Health Care Act.

Outside of the Freedom Caucus, Republicans who had opposed the American Health Care Act grappled with the revised text. Most were still opposed or undecided on Thursday.

“We’re taking a trillion bucks out and saying, ‘Good luck, states,’ ” said Rep. Mark Amodei (R-Nev.), whose district covers Reno and most of rural Nevada. “That may provide money to do tax reform, but what you leave in my state is that when the legislature meets, it’s got about a quarter-of-a-billion-dollar shortfall.”

House Speaker Paul D. Ryan (R-Wis.) had told reporters earlier in the day that he thought the latest proposal could win over moderates because it does not eliminate essential benefits altogether. Instead, states would be allowed to seek a waiver to define their own essential benefits, and if the federal government did not respond within 60 days to a request, the state’s changes could automatically go into effect.

“I’d argue that this is a bill a moderate would be more likely to support,” Ryan said. “Some people were concerned about [essential health benefits]. They’re now in the federal law, and a state would have to file a waiver. If anything, this puts more federal protections in.”

However, there was little evidence that MacArthur’s proposal had brought any of his fellow moderates on board. Rep. Mario Diaz-Balart (R-Fla.), who came around to “yes” when Republicans were preparing to bring the American Health Care Act to the floor last month, told a scrum of reporters that the latest amendment had thrown up “red flags” for him on issues such as preexisting conditions.

“At this stage, I’m not seeing much that I like,” Diaz-Balart said.

Rep. Patrick Meehan (R-Pa.), who wrote in Mike Pence for president as his suburban district broke against Trump, announced he would oppose the bill. “It threatens to send premiums skyrocketing for people with preexisting conditions,” he said in a statement.

Since House leaders need 216 votes to pass a bill, and every House Democrat currently opposes their legislation, Republicans can afford to lose only 22 lawmakers. “We’re going to go when we have the votes,” Ryan emphasized, “but that’s the decision we’ll make when we have it.”

Before the Affordable Care Act became law, consumers who lost employer-based coverage bought plans on the individual market under a provision of the 1996 Health Insurance Portability and Accountability Act. That law meant they could get coverage even if they had had prior medical issues, but they could be charged much more than other consumers.

Many were charged “four to five times the standard rate,” if not more, said Karen Pollitz, a senior fellow at the Kaiser Family Foundation. “It’s really kind of deterrent pricing.”

As GOP leaders worked to win over undecided members this week, many powerful interest groups — representing the elderly, disabled, physicians, hospitals and those with chronic diseases such as cancer — lobbied the same lawmakers to reject the bill.

Rick Pollack, the president and chief executive of the American Hospital Association, said in a statement that the MacArthur amendment “would dramatically worsen the bill” and that it “continues to put health coverage in jeopardy for many Americans.”

And James L. Madara, chief executive of the American Medical Association, wrote in a letter to House leaders that “health-status underwriting could effectively make coverage completely unaffordable to people with preexisting conditions.”

The American Cancer Society Cancer Action Network, which last week issued a statement criticizing the MacArthur proposal, urged its members to call their representatives “to vote against the new version.”

But Rep. Chris Collins (R-N.Y.), a close ally of the president, said he was advising undecided moderates that any vote they cast — or do not cast — would be attacked by Democrats. “In a couple of cases, I’ve said, ‘Trust me, in a year and a half, you’ll see ads on TV attacking you on something,’ ” he said.

As a candidate and president-elect, Trump had repeatedly advocated preserving the Affordable Care Act’s protections for those with preexisting conditions.

“I want to keep preexisting conditions,” he said during a CNN-Telemundo debate in February 2016. “It’s a modern age, and I think we have to have it.”

And in a Nov. 13 interview with “60 Minutes,” he called the provision “one of the strongest assets” of the health-care law.

On Thursday, however, White House press secretary Sean Spicer said the administration backed the latest version of the bill. He added that Trump is in no rush to get a health-care vote before his 100-day mark on Saturday. “He wants a vote when they have 216 votes,” Spicer said.

Paul Kane, Philip Bump and Amber Phillips contributed to this report.