In the course of 24 hours, the Republican plan to repeal and replace the Affordable Care Act went from poised for approval, to on hold, to totally dead.

House Speaker Paul Ryan canceled a vote on the legislation Friday after it became clear he could not get enough votes, thanks to divisions within his own party — a charge led by the House Freedom Caucus — and the Democratic conference’s refusal to support the measure.

Here’s a look at what happened in the 24 hours before the bill was killed.

Thursday afternoon: The House vote is delayed

On Thursday morning — the seventh anniversary of the day Obamacare was signed into law — members of the House Freedom Caucus went to the White House to negotiate with Trump.

The idea was to lay out final compromises that could win the votes of the group’s roughly three dozen conservatives. But members left that meeting unsatisfied, NewsHour’s Lisa Desjardins reported, without any promises to carry the bill forward.

Ryan continued to push back a press conference he had scheduled earlier in the day. Meanwhile, Democrats — led by House Minority Leader Nancy Pelosi — charged ahead with their criticism of the bill, though as Desjardins reported, she offered GOP leaders something of a compromise:

“If this bill were to fail today, rookie day, I would [be] ready to negotiate with them on how we can go forward, incorporating some of their ideas. This is a bad day for them. It’s bad if they win and it’s bad if they lose,” Pelosi said.

Thursday night: It’s back on

The White House told Republican leadership that it was done negotiating, prompting Ryan to say he would move forward with the vote after all.

Read more: Here’s why the vote on the Republican health care bill was delayed

“‘Negotiations are over, we’d like to vote tomorrow and let’s get this done for the American people.’ That was it,” Rep. Duncan Hunter of California told the Associated Press as he left the closed-door meeting.

After seven horrible years of ObamaCare (skyrocketing premiums & deductibles, bad healthcare), this is finally your chance for a great plan! — Donald J. Trump (@realDonaldTrump) March 24, 2017

Friday morning: Roll calls and changes

The House pressed ahead with a morning roll call, voting largely along party lines to make some changes to the bill, including the elimination of some Obamacare coverage requirements and stronger Medicaid benefits.

For most of the morning, it was unclear whether the bill had enough votes to move forward.

At an early afternoon press conference, White House Press Secretary Sean Spicer said a vote was planned for later that afternoon.

“It’s up to members of Congress now to decide if they want to be part of the effort to repeal former President Barack Obama’s Affordable Care Act,” Spicer told reporters at a news briefing. “The president and his team have committed everything they can to make this thing happen.”

Friday afternoon: It unravels

Around noon, Speaker Ryan went to the White House and urged President Trump to cancel a vote because he did not have the votes to pass it, according to a senior administration official. Trump told Ryan that he wanted to proceed with the vote.

But about three hours later, Ryan called the president to urge him to reconsider and pull the vote, the administration official said. Trump agreed, the official said, overruling advisers who pressed for a final vote.

At approximately 3:30 p.m., the president called Washington Post reported Robert Costa, who live-tweeted the conversation. “We just pulled it,” Trump said. Trump also told Costa that he didn’t blame Ryan, and was open to cutting a deal with Democrats on a health care bill in the future.

READ MORE: Trump and Ryan scramble to pick up the pieces after Obamacare repeal fails

Shortly after 4 p.m., Ryan appeared before reporters to officially announce that the vote had been canceled. “This is a setback, no two ways about it,” Ryan said.

Ryan said that Republicans would press on with the rest of their agenda, including efforts to overhaul the tax code, rebuild the military and pass a major infrastructure spending bill.

Soon after, Senate Majority Leader Mitch McConnell weighed in. “Obamacare is failing the American people and I deeply appreciate the efforts of the Speaker and the president to keep our promise to repeal and replace it. I share their disappointment that this effort came up short,” McConnell said in a statement.

Later that afternoon, Pelosi and other Democratic leaders called the failure of the American Health Care Act a victory for the American people.

“The majority of members saw how inhumane and egregious this [health care bill] would be,” Assistant Democratic Leader James Clyburn said in a news conference.

House Minority Whip Steny Hoyer said voters in last year’s election sent both Democrats and Republicans to the Capitol to make sure they had access to health care.

“We will not abandon that responsibility … and we trust that our Republican colleagues will not either,” Hoyer said.

After a Medal of Honor ceremony in the Oval Office, Trump told reporters he was disappointed the bill didn’t come to a vote, but he thought the next version of the bill — coming soon, he said — would be even better.

“I’ve been saying for the last year and a half that the best thing we can do politically speaking is let Obamacare explode,” Trump told reporters in the Oval Office after Ryan’s statement.

“I want to have a great health care bill and plan. And we will,” he added.

Digital politics editor Daniel Bush and correspondent John Yang contributed reporting.