WASHINGTON (AP) — GOP House leaders delayed their planned vote Thursday on a long-promised bill to repeal and replace “Obamacare,” in a stinging setback for House Speaker Paul Ryan and President Donald Trump in their first major legislative test.

The decision came after Trump, who ran as a master dealmaker, failed to reach agreement with a bloc of rebellious conservatives. Moderate-leaning Republican lawmakers were also bailing on the legislation, leaving it short of votes.

The bill could still come to a vote in coming days, but canceling Thursday’s vote was a significant defeat. It came on the seven-year anniversary of President Barack Obama signing the Affordable Care Act, years that Republicans have devoted to promising repeal.

Those promises helped them keep control of the House and Senate and win the White House, but now, at the moment of truth, they are falling short.

“No deal,” House Freedom Caucus Chairman Mark Meadows, R-N.C., said after he and his group of more than two dozen rebellious conservatives met with Trump to try to get more concessions to reduce requirements on insurance companies.

The Republican legislation would halt Obama’s tax penalties against people who don’t buy coverage and cut the federal-state Medicaid program for low earners, which the Obama statute had expanded. It would provide tax credits to help people pay medical bills, though generally skimpier than Obama’s statute provides. It also would allow insurers to charge older Americans more and repeal tax boosts the law imposed on high-income people and health industry companies.

The measure would also block federal payments to Planned Parenthood for a year, another stumbling block for GOP moderates.

In a danger sign for Republicans, a Quinnipiac University poll found that people disapprove of the GOP legislation by 56 percent to 17 percent, with 26 percent undecided. Trump’s handling of health care was viewed unfavorably by 6 in 10.

The survey was conducted March 16 to 21 with a margin of sampling error of plus or minus 3 percentage points.

GOP leaders had targeted Thursday for the climactic vote, in part because it marks the seventh anniversary of Obama’s signing the measure into law. With the House in recess awaiting the outcome of the White House meeting, C-SPAN aired video of that signing ceremony.

House Minority Leader Nancy Pelosi, D-Calif., couldn’t resist a dig.

“You may be a great negotiator,” she said of Trump. “Rookie’s error for bringing this up on a day when clearly you’re not ready.”

In a count by The Associated Press, at least 30 Republicans said they opposed the bill, enough to defeat the measure. But the number was in constant flux amid the eleventh-hour lobbying.

Including vacancies and expected absentees, the bill would be defeated if 23 Republicans join all Democrats in voting “no.”

Obama declared in a statement that “America is stronger” because of the current law and Democrats must make sure “any changes will make our health care system better, not worse for hardworking Americans.” Trump tweeted to supporters, “Go with our plan! Call your Rep & let them know.”

Tension has been building in advance of the critical vote, and a late-night meeting of moderate-leaning members in Speaker Ryan’s office Wednesday broke up without resolution.

A key moderate who had been in the meeting, Rep. Charlie Dent of Pennsylvania, issued a statement saying he would be voting “no” on the health bill. “I believe this bill, in its current form, will lead to the loss of coverage and make insurance unaffordable for too many Americans,” said Dent, a leader of the Tuesday Group of moderate-leaning Republicans.

Congressional leaders have increasingly put the onus on the president to close the deal, seemingly seeking to ensure that he takes ownership of the legislation — and with it, ownership of defeat if that is the outcome.

Moderates were given pause by projections of 24 million Americans losing coverage in a decade and higher out-of-pocket costs for many low-income and older people, as predicted by the nonpartisan Congressional Budget Office.