Senate Republicans all but admitted defeat Tuesday in their seven-year quest to overturn the Affordable Care Act, acknowledging that they lacked the votes to make good on their vow to “repeal and replace” President Barack Obama’s signature legislative accomplishment.

Hours after GOP leaders abandoned a bill to overhaul the law known as Obamacare, their fallback plan — a proposal to repeal major parts of the law without replacing them — quickly collapsed. A trio of moderate Republicans quashed the idea, saying it would irresponsibly snatch insurance coverage from millions of Americans.

Senate Majority Leader Mitch McConnell (R-Ky.), who spent weeks trying to knit together his fractious caucus in support of the original GOP legislation, said he would nonetheless schedule a vote “early next week” on the repeal plan. But he appeared to acknowledge that it seemed doomed.

“This has been a very, very challenging experience for all of us,” McConnell told reporters. “It’s pretty obvious that we don’t have 50 members who can agree on a replacement.”

The collapse of the effort marks a devastating political defeat for congressional Republicans and for President Trump, who had pledged to roll back the Affordable Care Act on “Day One” of his presidency.

It also leaves millions of consumers who receive health insurance through the law in a kind of administrative limbo, wondering how their care will be affected now that the program is in the hands of government officials who have rooted openly for its demise.

On Tuesday, Trump told reporters in the White House’s Roosevelt Room that he now plans to “let Obamacare fail. It will be a lot easier.” That way, he said, his party would bear no political responsibility for the system’s collapse.

“We’re not going to own it. I’m not going to own it,” the president said. “I can tell you the Republicans are not going to own it. We’ll let Obamacare fail, and then the Democrats are going to come to us” to fix it.

But Trump’s comments appeared to ignore the many Republican lawmakers who are anxious about depriving their constituents of federal benefits on which they now rely. The president invited all 52 Republican senators to join him for lunch Wednesday at the White House to try to get the repeal effort back on track.

Senate leaders have been struggling to devise a plan to overhaul Obamacare since the House passed its version of the legislation in May, a flawed bill that some House members openly invited the Senate to fix. With just 52 seats, McConnell could afford to lose the support of only two members of his caucus — and even then would rely on Vice President Pence to break the tie.

The measure he produced would have scaled back key federal insurance regulations and slashed Medicaid deeply over time. But it did not go far enough for many conservative Republicans, who wanted to roll back more of the ACA’s mandates on insurers.

And the bill went much too far for many moderates, especially Republicans from states that had taken advantage of the ACA’s offer to expand Medicaid eligibility. The bill would have cut Medicaid funding and phased out its expansion in 31 states and the District of Columbia. Some senators worried that their states would be saddled with the unpalatable choice of cutting off people’s health coverage or shouldering a massive new financial burden.

“This is the Senate. Leadership sets the agenda, but senators vote in the interests of their states,” said Sen. Marco Rubio (R-Fla.).

Sen. Orrin G. Hatch (R-Utah) offered a blunt assessment of why the effort fell short: “We are so evenly divided, and we’ve got to have every Republican to make things work, and we didn’t have every Republican,” he said.

Two Republicans — Collins, a moderate, and conservative Sen. Rand Paul (Ky.) — declared late last week that they could not support the latest version of the bill. Late Monday night, as six of their colleagues talked health-care strategy with Trump over dinner at the White House, conservative Sens. Mike Lee (Utah) and Jerry Moran (Kan.) announced that they, too, would oppose the bill, and the measure was dead.

Senate Majority Whip John Cornyn (R-Tex.), whose job is to count votes, said he had “no idea” Lee was defecting until he left the White House meeting — though he had gotten a heads up from Moran.

Key Republicans held out hope that the effort could be revived. House Speaker Paul D. Ryan (R-Wis.) said Tuesday that he “would like to see the Senate move on something” to keep the repeal-and-replace process alive.

Pence, speaking at the National Retail Federation’s annual Retail Advocates Summit, lent his support to the repeal plan, challenging Congress to “step up” and repeal the current law so lawmakers could “work on a new health-care plan that will start with a clean slate.”

Republicans last voted on repeal in 2015. Every current GOP senator who was then in the Senate voted for it, except Collins. But it was a meaningless protest vote; Obama was president, and he quickly vetoed it. With Trump in the White House, a vote to repeal the law without replacing it could have far-reaching consequences.

Abolishing Obamacare’s central pillars — such as the mandate that taxpayers buy coverage; federal subsidies for many consumers’ premiums; and Medicaid coverage for roughly 11 million Americans — without replacing them could wreak havoc in the insurance market. In January, the Congressional Budget Office estimated that premiums in the individual insurance market would rise by as much as 25 percent next year and would roughly double by 2026.

The CBO said repeal would cause the number of uninsured people to rise by 18 million next year and by 32 million by 2026.

“For insurers, the worst possible outcome in this debate has always been a partial repeal with no replacement, which is exactly what Congress is about to take up,” Larry Levitt, senior vice president for special initiatives at the Kaiser Family Foundation, wrote in an email. “Insurance companies would be on the hook for covering people with preexisting conditions, but with no individual mandate or premium subsidies to get healthy people to sign up as well.”

With the repeal effort foundering, White House officials seem to lack a clear road map for managing the law. Rep. Tom Cole (R-Okla), who chairs the appropriations subcommittee overseeing the Health and Human Services Department, said Tuesday, “I’m not sure what’s going on right now.”

HHS Secretary Tom Price issued a news release Tuesday saying, “The status quo is not acceptable or sustainable.” But he offered no clues to what his agency plans to do in the coming weeks as insurers finalize rates for 2018 and decide whether to participate next year in the federal insurance marketplaces.

“We will work tirelessly to get Washington out of the way, bring down the cost of coverage, expand healthcare choices, and strengthen the safety net for future generations,” Price said.

Several lawmakers and governors, meanwhile, said they would begin pushing for a bipartisan fix to shore up the ACA. Senate Health, Education, Labor and Pensions Committee Chairman Lamar Alexander (R-Tenn.) said in a statement that his panel would hold hearings to explore “how to stabilize the individual market” under the existing law.

A bipartisan group of 11 governors — including Republicans Charlie Baker (Mass.), Larry Hogan (Md.), John Kasich (Ohio), Brian Sandoval (Nev.) and Phil Scott (Vt.) — said they “stand ready to work with lawmakers in an open, bipartisan way to provide better insurance for all Americans.”

Asked if he would be willing to work with Democrats, McConnell said that “we’ll have to see what happens” with next week’s vote.

Senate Minority Leader Charles E. Schumer (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.)renewed their calls for Republicans to work with Democrats.

“It should be crystal clear to everyone on the other side of the aisle that the core of the bill is unworkable,” Schumer said. “The door to bipartisanship is open now. Republicans only need to walk through it.”

As Schumer spoke on the Senate floor, Sen. Joe Manchin III (D-W.Va.), one of the few in the chamber who has tried to be a bipartisan broker on health care, was placing calls to fellow senators who, like him, are former governors — a total of 11 senators including Alexander, John Hoeven (R-N.D.), Mike Rounds (R-S.D.), Angus King (I-Maine), Jeanne Shaheen (D-N.H.) and Margaret Wood Hassan (D-N.H.).

Aides said Manchin was presenting nothing specific yet to his colleagues, just a plea to “sit down and start bipartisan talking.”

While the path forward remained uncertain, consumers and health industry players continued to reach out to lawmakers. On Monday, two members of the American Cancer Society’s Cancer Action Network journeyed from West Virginia, and one of them spoke with a Capito aide about an 18-month-old girl who had developed cancer while her mother was working part-time at a bank. After the woman lost her job, both she and the little girl went on Medicaid, allowing the child to receive treatment.

“A lot of times people assume anyone on Medicaid is too lazy to work,” the child’s grandmother Lora Wilkerson told the aide, handing her a photo of the girl — bald, with a teddy bear in her arms.

“Can you please ask Ms. Capito to look at this picture when she casts her vote?” Wilkerson said.

The aide, according to Capito’s spokeswoman, made sure the senator saw it.