(Bloomberg) — House Republicans abandoned their efforts to repeal and partially replace Obamacare after President Donald Trump and Speaker Paul Ryan concluded they didn't have enough support, marking an embarrassing setback for the GOP agenda.

One day after the president demanded a do-or-die vote on the longtime GOP priority, Ryan scrapped the scheduled vote Friday afternoon after Trump asked him to in a phone conversation, according to a senior leadership aide.

“I will not sugarcoat this: This is a disappointing day for us,” Ryan told reporters. “But it is not the end of the story.”

Read more:

• Durbin details cost of Ryancare to Illinois

• This Emanuel also opposes the Republican health care bill

• Editorial: No one thinks the GOP health bill is a good idea for Illinois

Trump told reporters in the Oval Office that the GOP was maybe 10 votes short, but didn't quite get here. “We'll end up with a truly great health-care bill after the Obamacare mess explodes,” he said.

Ryan said the party will need some time to regroup. “Now, we're going to move on with the rest of our agenda,” he said. “We will proceed with tax reform.”

Hospital stocks surged on the news of the cancellation, with the BI North America Hospitals Competitive Peer Group Index up 5.4 percent at the close in New York. Centene Corp., an insurer that focuses on Medicaid plans, rose 5.2 percent to $68.73. Hospitals and insurers like Centene would have been hurt by the GOP bill, which would cut millions of people from health insurance and roll back an expansion of the Medicaid program for the poor.

Lawmakers sounded ready to turn their attention to other issues.

“This bill is dead,” said Republican Greg Walden of Oregon, the former chairman of the Energy and Commerce Committee.

This outcome is an embarrassing setback that casts doubt on Trump and Ryan's ability to deliver on their ambitious agenda, including taxes and infrastructure, both of which are being closely watched by Wall Street.

'LEARNING LESSON'

“I think that this is a learning lesson and we've made this shift from an opposition party to a governing party and I hope that we do learn from this experience and that we are able to not make the perfect the enemy of the good,” said Andy Barr, a Kentucky Republican. “Because this is not a game.”

Representative Steve Womack said Republicans need to get back to basics and have an "introspective conversation" about what it means to govern.

"We have moderates and we have ultra conservative people in the conference. We have to reeducate ourselves in mathematics and basic arithmetic," he said. "We have to learn that we're not just the party of no. We have to learn how to govern."

He called it "a loss for leadership."

It also leaves the health care issue in limbo in Washington.

“Obamacare is the law of the land. it's going to remain the law of the land until it's replaced,” Ryan said. “We're going to be living with Obamacare for the foreseeable future.”'

Democrats said they were ready to have a conversation on how to improve Obamacare.

"It is now abundantly clear to every Member of Congress that the only option for progress going forward is bipartisan legislation to improve the Affordable Care Act. That's what the American people want. It's time to govern," said John Yarmuth of Kentucky, the top Democrat on the House Budget Committee.

Trump himself had waded into the legislative weeds to fight for the bill, meeting with scores of lawmakers and traveling to Capitol Hill on Tuesday to address the full House Republican conference. The president "left everything on the field," according to spokesman Sean Spicer.

'SOME DIVISIVENESS'

Top Trump aides told House Republicans Thursday night that the president had run out of patience: he wanted a vote Friday, win or lose, even if that meant leaving Obamacare in place.

"There's some divisiveness within our conference now that's not healthy," said New York Republican Chris Collins, the first House members to endorse Trump during the campaign. "I've never seen this before. People are just refusing to talk to each other. They're storming past each other. This is not good."

Both conservatives and moderates voted against the bill. Among those who announced opposition to the bill was House Appropriations Chairman Rodney Frelinghuysen of New Jersey.

During Obama's administration, the Republican-controlled House voted more than 50 times to repeal or curtail Obamacare. One repeal measure made it to Obama's desk, and he vetoed it. Ryan boasted during last year's campaign that the GOP had a clear consensus on how to finally repeal and replace the health law under a Republican president.

Trump and Ryan repeatedly called Obamacare a "disaster" that was collapsing under its own weight. But in 2015, the proportion of the U.S. population without insurance fell to a record low -- about 10.5 percent of Americans younger than 65, down from 18.2 percent in 2010.

The Republican proposal aimed to pull hundreds of billions of dollars out of the health system by winding down Obamacare's expansion of Medicaid and limiting its subsidies, thereby threatening revenue for hospitals, doctors and insurance companies.

But conservatives wanted a more complete repeal, while moderates were taken aback when the nonpartisan Congressional Budget Office said the GOP plan would leave 24 million fewer Americans with health insurance by 2026.

Here are some reactions to the House move: