WASHINGTON (AP) -- Their health care bill teetering on the brink, House Republican leaders and President Donald Trump intensified their already-fierce lobbying Wednesday to save the long-promised legislation, agreeing to changes that brought two pivotal Republicans back on board.

Democrats stood firmly united against the health bill, but they generally applauded a separate $1 trillion-plus spending measure to keep the government running, which passed the House on a bipartisan vote of 309-118.

On the health care front, Reps. Fred Upton of Michigan and Billy Long of Missouri emerged from a White House meeting with Trump saying they could now support the bill, thanks to the addition of $8 billion over five years to help people with pre-existing conditions.

"Today we're here announcing that with this addition that we brought to the president and sold him on in over an hour meeting in here with him, that we're both yeses on the bill," Long told reporters. The potential defections of Upton and Long over the previous 48 hours had emerged as a possible death knell for the bill, and with it seven years' worth of GOP campaign promises to repeal and replace Democrat Barack Obama's Affordable Care Act.

"'We need you, we need you, we need you,'" Long described as the message from a president eager for a win after spending more than 100 days in office without a single substantive congressional accomplishment, save Senate confirmation of a Supreme Court justice.

Democratic Minority Leader Nancy Pelosi saw more of an acting job than a true change of heart.

Upton "has always been a yes," she said. "People will say 'I am a no and give me some fake reason to make it look like the bill is better.'"

The latest iteration of the GOP bill would let states escape a requirement under Obama's law that insurers charge healthy and seriously ill customers the same rates. Overall, the legislation would cut the Medicaid program for the poor, eliminate Obama's fines for people who don't buy insurance and provide generally skimpier subsidies. The American Medical Association, AARP and other consumer and medical groups are opposed. The AMA issued a statement saying Upton's changes "tinker at the edges without remedying the fundamental failing of the bill - that millions of Americans will lose their health insurance as a direct result."

If the GOP bill became law, congressional analysts estimate that 24 million more Americans would be uninsured by 2026, including 14 million by next year. Even if the GOP secures a win in the House, the Senate is expected to change the bill.

Separately, on the spending bill to keep the government running, Trump and GOP leaders hailed it as a victory, citing increases in money for the military. But Trump himself has undermined that message by complaining over Twitter about the need for Democratic votes on the bill and suggesting that a "good 'shutdown'" might be in order.

Some Republicans were not on-message either about the $1.1 trillion spending bill, the bipartisan result of weeks of negotiations in which top Democrats like Pelosi successfully blocked Trump's most controversial proposals, including a down payment on his oft-promised Mexico border wall, cuts to popular domestic programs, and new punishments for so-called sanctuary cities.

"From my point of view, we pretty well got our clock cleaned," said Republican Sen. Lindsey Graham of South Carolina.

Democratic votes were needed to pass the measure even though Republicans control both the White House and Congress, which made Pelosi and Senate Minority Leader Chuck Schumer powerful participants in the talks. That resulted in bipartisan outcomes like $407 million to combat Western wildfires and a $2 billion increase for medical research at the National Institutes of Health. Schumer has crowed over the outcome in a series of interviews, seemingly irking the White House.

Now that it's passed the House, the mammoth, 1,665-page measure to fund the government through September heads to the Senate, which is also expected to approve it. Despite his complaints, Trump has promised to sign it.

The certain outcome for the spending bill stood in contrast to the suspense shrouding the health care legislation, as the window for action closes for now. The House is to leave Washington for an 11-day recess on Thursday.

Even with Upton and Long in the "yes" column, GOP leaders continued to hunt for votes among wary moderates. More than a dozen opponents - including Kentucky's Tom Massie, New Jersey's Chris Smith and Leonard Lance and Pennsylvania's Patrick Meehan - said they were still no despite the changes.

They have complained that the bill erodes protections under Obama's law by opening the door for insurers to charge people with pre-existing illnesses unaffordable premiums.

A supporter of the legislation, Rep. Tom Cole, R-Okla., said that at the least, backing from Upton and Long "breaks the momentum of drift away from the bill" among GOP moderates.

The Associated Press now counts 19 Republicans opposed to the bill, with at least 11 others undecided, though it was not immediately clear how the addition of the Upton amendment would impact those stances. GOP leaders can lose only 22 from their ranks and still pass the bill, which they already had to pull from the House floor once as it became clear it would fail.

That earlier collapse was a humiliating episode that raised questions about House Speaker Paul Ryan's leadership and the GOP's ability to govern at all. Ryan is eager to avoid a rerun and has said repeatedly he will not schedule a vote until passage is assured.

More From KROC-AM