Obamacare remains the law of the land for the foreseeable future.

Republicans, who have campaigned for years on a pledge to repeal the Democrats’ signature health law, saw their efforts collapse in dramatic fashion on Friday.

Just minutes before the U.S. House was set to vote, Republican leaders yanked their replacement bill conceding they didn’t have the votes needed to adopt the White House-backed proposal.

Upwards of two-dozen hard-line conservatives and moderates had said they were opposed to the legislation, more than enough to sink it.

“This is a setback. No two ways about it,” House Speaker Paul Ryan, R-Wis., told reporters Friday afternoon. “But it is not the end of this story.”

GUIDE: The Affordable Care Act in Georgia 

IN-DEPTH: Georgians with Obamacare in the dark

Ryan said the House would next move on to other GOP priorities such as an overhaul of the tax code. It was unclear if or when the party would attempt another major health care overhaul in the near future.

Friday’s events were a major disappointment for Ryan, congressional Republicans and President Donald Trump, who campaigned on his skills as a dealmaker and invested significant political capital in trying to muscle the plan through. The failure was one of the first major test of his young administration.

Paul Ryan says his current plan to repeal and replace Obamacare involves more than the budget reconciliation bill currently up for debate.

“I think everybody’s emotions are pretty high right now,” said Rep. Rob Woodall, R-Lawrenceville.

“I put this down as a missed opportunity. But the question isn’t ‘what did we disagree about this time around.’ The question is what do we do to learn from this experience. We don’t know what that answer is now.”

Eight of Georgia’s nine Republican congressmen had expressed support for the proposal, known as the American Health Care Act.

Many Americans – especially working class, older people – would have received hundreds or even thousands of dollars less in tax credits to help them buy insurance under the proposal. But many younger, more well off individuals would have had access to tax credits, some for the first time.

The bill also would have cut an estimated $880 billion in federal funding for state Medicaid programs. And it would have done away with the requirement that insurers provide certain “essential health benefits,” such as maternity care and addiction treatment.

But it also kept in place some of the most wildly popular elements of Obamacare, such as allowing parents to keep kids on their insurance up to age 26.

Rep. Austin Scott, a leadership ally and proponent of the bill, blamed the ultra-conservative Freedom Caucus for killing the legislation.

“I guess people who like Obamacare can thank the Freedom Caucus,” the Tifton Republican said minutes after the news broke. “People who wanted us to replace it should know that the majority of us were trying to do the right thing and get a new piece of legislation passed.”

The sole Georgian on the Freedom Caucus, Jody Hice, R-Monroe, rejected earlier versions of the health bill, but his position on the most recent incarnation was unknown. After the legislation was shelved, he thanked Ryan and the White House for being willing to negotiate.

GOP Plan: Health care plan stings south Georgia Trump voters

Obamacare: The faces of Obamacare in Atlanta

"This is all part of the legislative process and taking the time to do it right will ultimately lead us to a good place — the full repeal of Obamacare in favor of market-oriented health care solutions that benefit all Americans," Hice said in a statement.

Democrats, bruised at the polls after years of GOP batterings on the Affordable Care Act, cheered the news that the bill was shelved. They had been universally opposed to the measure.

“Now that this dangerous legislation has been pulled from House consideration, I am hopeful that we can instead come together to improve on the progress we have made with the Affordable Care Act,” Rep. Sanford Bishop, D-Albany, said in a statement.

Take it or leave it

It became evident the bill was in trouble earlier Friday when moderate Republicans who traditionally follow leadership began defecting, citing concerns that millions of Americans would lose health coverage under the bill.  That came after leaders made considerable changes late Thursday aimed at appeasing wary members of the ultra conservative Freedom Caucus who had long argued that the GOP bill didn’t go far enough. The biggest proposed change was eliminating “essential health benefits” such as maternity care and mental health services, which Obamacare requires insurers to offer.

Trump on Thursday had pulled out the big guns, sending his top White House aids to rally conservative lawmakers. His message was clear: this is the bill to do away with the Affordable Care Act — take it or leave it.

The president says his healthcare plan failed because there wasn't enough support from Democrats.

But members of the Freedom Caucus remained opposed to the bill, saying any GOP health plan should gut Obamacare entirely while also lowering health care premiums.

GOP leaders maintained the bill would make coverage more affordable and create more insurance options for Americans, while also reducing the federal deficit and giving states more flexibility to deliver health care in a way that meets the needs of their unique populations.

Earlier Friday afternoon, Ryan rushed to the White House, where he told Trump that he lacked the votes to pass the legislation. For an hour or so after their meeting it appeared that the House would still vote on the bill, but that later changed at Trump's suggestion, according to a House GOP aide.

“You can’t force someone to vote in a certain way,” White House Press Secretary Sean Spicer said at a press briefing Friday.

“At the end of the day, this isn’t a dictatorship,” he said. Lawmakers are the ones who have to go back to the people they represent and tell them why they didn’t uphold their pledge to repeal Obamacare, Spicer added.

The president later indicated he would be content allowing the Affordable Care Act to remain the law of the land — and letting it collapse under its own weight.

“People will see how bad it is,” Trump told reporters. “And it’s getting much worse.”

He said Democratic supporters of Obamacare would eventually come to him and seek out a deal on a new health care plan after seeing it break down.

Not all Republicans were convinced.

The Affordable Care Act is “the law of the land for the future. I don’t know what else to say,” said Rep. Tom Rooney, R-Fla.

 ‘The game’s not over’ 

The GOP health plan would have had sweeping implications for Georgia.

An estimated 750,000 Georgians — many of them working class and older residents who live in rural areas — were projected to become uninsured under the plan, an analysis by Georgia State University found. That's in part because of reduced tax credits.

The state could have also been on the hook for billions of dollars in funding for its Medicaid health program for the poor, which critics warned would have led to large cuts in enrollment and services.

Hospitals were also expected to take a financial hit under the bill by having to care for large numbers of newly uninsured patients. According to the nonpartisan Congressional Budget Office, 24 million more people were expected to go uninsured under the Republican plan compared to Obamacare.

Georgia opponents cheered Friday when the legislation went down.

“Today’s outcome is a victory for health care consumers in every corner of this state,” said Cindy Zeldin, executive director of the consumer advocacy group Georgians for a Healthy Future. “The American Health Care Act would have caused more than half a million Georgians to lose their coverage entirely while doing nothing to improve affordability or quality of care.”

In the hours leading up to Friday’s news, Democrats urged Congress to reject the bill.

“Health care is a right. It is not a privilege reserved for a wealthy few,” U.S. Rep. John Lewis, D-Atlanta, said during an impassioned speech amid the House floor debate. “For what does it profit this body to pass this bill and lose our soul? This bill is a shame. It is a disgrace.”

Even after Friday’s stunning turn of events, some Georgia Republicans said they were optimistic the party could bounce back and replace Obamacare.

“The game’s not over,” said Rep. Barry Loudermilk, R-Cassville. “We’re taking a half time right here to go home, get some rest, come back and continue on.”