Donald Trump. REUTERS In an abrupt turn of events, House Republicans came within inches of the finish line Wednesday on their repeal and replacement of Obamacare.

After the American Health Care Act looked close to dead at the start of the day, a flip by two key centrist holdouts on the bill appears to have its passage closer than ever.

Centrists had pushed back on an addition to the legislation that allowed states to apply for a waiver to repeal some Obamacare regulations, which some members worried would undermine protections for people with preexisting conditions.

To combat this concern, Rep. Fred Upton on Tuesday began circulating an amendment to provide an additional $8 billion in funds to protect those sick Americans in the event that such a waiver is triggered.

The amendment and a trip to meet with President Donald Trump at the White House was apparently enough to win over Upton and fellow hold out Rep. Billy Long. Their movement, along with the potential cover it could provide other more moderate members, means the legislation is closer to passage than ever before.

Importantly, the additional funding also has not turned away members of the conservative House Freedom Caucus, which only supported the AHCA after the original provision providing for state waivers was added.

A source close to the Freedom Caucus told Business Insider that some members of the Caucus had seen legislative text of the Upton amendment.

"The Freedom Caucus will continue to support as long as there are no substantive policy changes," the source said.

So if the changes are limited to funding, the source said, the Freedom Caucus will remain on board.

The movement appears to have set the stage for GOP House leadership to bring the bill to a floor for a vote as soon as Thursday. The Freedom Caucus source told Business Insider that members expect the bill to be brought to the floor on Thursday afternoon.

Earlier Wednesday, House Speaker Paul Ryan told conservative radio hose Hugh Hewitt that the the House GOP was "extremely close" to obtaining the necessary votes.