WASHINGTON — After wooing GOP moderates with extra money for patients with pre-existing conditions, House Republicans said they would vote Thursday on a revised bill to repeal-and-replace Obamacare — setting the stage for a high-stakes showdown on one of President Trump's top priorities.

House GOP leaders announced the vote Wednesday night, after weeks of negotiations, hours of wooing wavering Republican lawmakers, and a last-minute sweetener added to the bill: an $8 billion amendment to help patients with pre-existing conditions pay for higher premiums and out-of-pocket costs.

"I support the bill with this amendment," said Rep. Fred Upton, R-Mich., after meeting with President Trump at the White House on Wednesday morning. Upton is an influential player on health care policy, and he had previously opposed the bill amid concerns it would undermine protections for people with pre-existing conditions.

Rep. Fred Upton, joined by Reps. Billy Long and Greg Walden, speaks to the media about health care negotiations after meeting with President Trump at the White House on May 3, 2017. (Photo: Jim Lo Scalzo, European Pressphoto Agency)

Another holdout, Rep. Billy Long, R-Mo., also switched from a "no" to a "yes" after meeting with Trump and working with Upton on his amendment.

The biggest sticking point so far: the provision in Obamacare that bars insurance companies from discriminating against those with pre-existing conditions. The current GOP bill would dramatically undermine that, by allowing insurance companies to charge people with pre-existing conditions — anything from cancer to pregnancy — higher premiums than other consumers.

That change prompted Upton's push to add the extra $8 billion to help sicker patients pay their premiums and other health care bills. Upton and Long both sit on the House Energy and Commerce Committee, which has played a central role in drafting the GOP bill, called the American Health Care Act.

With Democrats unified against the measure, GOP leaders can only lose about 22 Republicans and still pass the bill.The proposal has been a tug-of-war between the moderate and conservative factions inside the House Republican Conference during weeks of intense negotiations and embarrassing setbacks.

By multiple news outlets’ counts, roughly 20 lawmakers said they’d vote “no” as of Tuesday afternoon and about two dozen others remained undecided. With the new money, Republicans expressed confidence that they could win passage of the bill, a message echoed by hard-line conservatives who helped tank an earlier version of the GOP measure.

"We see that as being a net plus in terms of the vote count," said Rep. Mark Meadows, R-N.C., head of the conservative House Freedom Caucus.

In a series of radio interviews Wednesday, House Speaker Paul Ryan, R-Wis., said Republicans were getting “extremely close” to having the votes they need in the House. He touted the latest changes to the bill, asserting that with added funding for high-risk pools, “we’re making sure that we have three or four layers of protections for people with pre-existing conditions.” Ryan also said that by promoting high-risk pools and directly subsidizing people with catastrophic illnesses, “you dramatically lower the price of premiums for everyone else buying health insurance.”

But critics said the Upton provision was still woefully inadequate to protect those with pre-existing conditions, and they noted that the Congressional Budget Office estimated an earlier version of the legislation would cause 24 million people to either forgo or lose their health insurance.

“Despite today’s wheeling and dealing, the GOP repeal bill still drops the coverage guarantee for people with pre-existing conditions, strips coverage from millions, and drives up costs for millions more," said Frederick Isasi, executive director of Families USA, a liberal-leaning health advocacy group. "A measly $8 billion handout isn’t going to change that."

And some Republicans reaffirmed their opposition to the bill and blasted the latest changes as Washington at its worst.

"The AHCA is like a kidney stone — the House doesn't care what happens to it, as long as they can pass it," Rep. Thomas Massie, R-Ky., said in a tweet on Wednesday.

The GOP bill would repeal major elements of the 2010 Affordable Care Act and allow states to opt out of other provisions, including several popular consumer protections. For example, states could seek a waiver from existing requirements that insurers must cover maternity care, substance abuse and other key health services.

VIDEO: Trump pushes for second health care vote without the votes in Congress

States can also seek an exemption of the pre-existing condition protections, allowing insurers to charge such patients more if the state has created a high-risk pool. Such risk-sharing programs are intended to help lower patient costs, but they have had mixed results in the past.

If the House does not pass the bill this week, some lawmakers warned they might lose momentum and be forced to look at other options for unraveling Obamacare.

“There’s only so long that you can work a certain principal to try to get to 218 votes, and I don’t know that that improves with time," Meadows said. "If we don’t have a vote this week on it, we’ll have to do a different strategy."

Contributing: David Jackson, Eliza Collins and Craig Gilbert