WASHINGTON — Despite pressure from the White House, House Republicans determined Thursday night that they don’t have the votes to pass a rewrite of the Affordable Care Act and will not seek to put their proposal on the floor on Friday.

A late push to act on health care had threatened the bipartisan deal to keep the government open for one week while lawmakers crafted a longer-term spending deal. Now, lawmakers are likely to approve the spending bill when it comes to the floor Friday and keep the government open past midnight. The failure of Republican leaders to summon enough support for a renewed health-care push is evidence of just how difficult it is to overhaul Obamacare, despite seven years of promises to repeal and replace the 2010 law. Conservatives and moderates have repeatedly clashed over what legislation should look like, most sharply over bringing down insurance premiums in exchange for limiting what kind of coverage is required to be offered.

Up to 15 or so House Republicans have publicly said they would not support the latest draft of the measure, leaving House Speaker Paul Ryan, R-Wis., and the White House an incredibly narrow path to a simple majority. If all 238 Republicans are present for a vote, Ryan can lose only 22 Republicans and still pass the bill with the barest of majorities.

Nevertheless, Republicans’ failure to secure a health-care deal will help ensure the government stays open past midnight on Friday – at least for one week. Lawmakers agreed to the stopgap measure so they could finish negotiating a broader deal to fund the government through September. Republicans have stated that they need Democratic support to pass the long-term spending measure, which they expect to consider next week.

The Senate stands ready to approve a one-week spending measure, but only once the broader spending agreement is complete. Senate Minority Leader Charles Schumer, D-N.Y., on Thursday blocked a measure that Republican leaders hoped would allow the Senate to approve the stopgap budget without a formal vote. Schumer has indicated that he will drop his objections once he is assured a long-term budget agreement is in place, according to Senate Democratic aides.

Senators in both parties told reporters they were instructed not to leave Washington on Thursday night.

“Instead of rushing through health care,” Schumer told reporters, “they first ought to get the government funded for a full year – plain and simple.”

The frenzy of activity behind closed doors Thursday was largely driven by White House officials who were eager to see a vote on the measure ahead of the 100-day mark for President Trump while congressional leaders in both parties were more focused this week on a spending agreement, according to several people involved in the discussions who spoke on the condition of anonymity because they were not allowed to speak publicly.

The White House tried to jump-start talks on health care after House Republicans failed to pass a previous attempt at an ACA rewrite at the end of March. This week, the hard-line House Freedom Caucus announced it was behind a tweaked proposal.

But Democrats fiercely oppose any effort to change the ACA and threatened to pull their support from the short-term bill if Republicans moved forward with that effort.

“If Republicans pursue this partisan path of forcing Americans to pay more for less and destabilizing our county’s health-care system,” said House Minority Whip Steny Hoyer, D-Md., then “Republicans should be prepared to keep the government open on their own.”

House Minority Leader Nancy Pelosi, D-Calif., told a meeting of Democratic whips on Thursday that she had called Ryan and told him there were two conditions for Democratic support of the short-term funding bill, according to aides in the room. Democrats would only sign off on the emergency spending measure to allow lawmakers time to pass the longer-term spending deal, and they would not back the measure if doing so would allow Ryan time to set up a vote on a rewrite of the Affordable Care Act. Democrats fiercely oppose replacing the law.

The sudden turmoil is yet another sign of Congress’ inability to meet deadlines for its most basic function: keeping the government’s lights on. And it presages fights between Congress, the White House and both parties over spending priorities, despite the one-party rule that gave some observers hope that the gridlock would cease.

Trump weighed into the spending wars on Thursday morning, indicating it was Democrats who bore the blame for shutdown threats because the party was focused on “bailing out insurance companies” while the president wants to “rebuild our military and secure our border.”

But it was Republicans who this week jettisoned Trump’s top priority – money for his proposed wall along the U.S.-Mexico border – because of widespread agreement that it should not be tied to the spending deal. Trump has also agreed to pay the cost-sharing subsidies for low-income people who get their insurance under the ACA – something he threatened to withhold if he did not get money for the wall.

Ryan on Thursday also blamed Democrats for “dragging their feet” on negotiations in an apparent preparation to blame Democrats if their deal falls through.

“I would be shocked if they would want to see a government shutdown, that the Democrats would want to do that,” Ryan told reporters at his weekly press briefing. “The reason this government funding bill is not ready is because Democrats have been dragging their feet.”

The standoff is the first in what could be several budget battles between Congress and the White House this year. Trump has called for massive hikes to defense spending and harsh cuts to domestic agencies in his 2018 budget, a proposal that many Republicans have rejected out of hand. He is also likely to revive calls for money to begin constructing the border wall – which by some estimates would cost as much as $21 billion – in future budget negotiations.

Ryan and Senate Majority Leader Mitch McConnell, R-Ky., were forced to negotiate with Democrats on the budget after it became clear that Republicans lacked enough votes to pass a long-term spending bill on their own. As a result, the the leaders have had the uncomfortable task of writing a measure that ignores nearly all of Trump’s priorities, including money for the border wall.

Schumer, meanwhile, sought to refocus blame on Republicans, arguing that the only thing standing in the way of a long-term agreement was Trump himself. Congressional leaders were nearing a final deal several weeks ago, but the talks were derailed when Office of Management and budget director Mick Mulvaney announced that Trump would demand that money for the border wall be included in the funding bill.

“Unfortunately the president stood in the way for quite a long time,” Schumer said. “That’s why we’re a little delayed.”

Congressional leaders then hoped to finalize a spending deal by midweek, but the talks were stuck on a small number of unrelated policy provisions, known as riders. Democrats complained that GOP leaders were trying to use the spending bill to cut abortion access and scale back Wall Street reforms passed under President Barack Obama.

Pelosi accused Republicans of complicating the negotiations with unnecessary demands.

“They’re mixing apples and oranges here,” Pelosi said at a weekly news conference. “They are making matters worse.”

Republicans have lodged similar complaints about Democrats’ demands for an extension of health-care benefits for miners and money to help Puerto Rico continue making Medicaid payments that were subsidized under Obamacare.

Trump criticized the demand in a Thursday morning tweetstorm as a bailout for insurance companies in Puerto Rico, a criticism repeated later in the day by White House press secretary Sean Spicer.

Spicer said Democrats have shifted their demands as the spending negotiations wear on.

“They keep moving the goal post,” Spicer said. “The issue right now is to make sure that we do what’s in the best interest of this country and our people by keeping the government open.”

The fighting continued despite signs of agreement Wednesday when Trump announced plans to continue cost-sharing payments under the ACA.

Republicans have not indicated how they plan to handle the policy provisions, but most GOP negotiators said they were pleased with the direction of the negotiations.

The long-term spending bill is expected to include several White House priorities, such as increases in funding for border security and defense spending, including an unspecified amount to repair fencing and new surveillance technology to patrol the nearly 2,000-mile border, the aides said. Democrats have said they support increased border security as long as no money goes toward building a physical wall.