Congress pushed forward a sweeping spending bill Wednesday, a rare bipartisan accord to keep the government running for the remainder of the 2017 fiscal year.
But Republicans had a tougher time trying to salvage their Obamacare overhaul with a last-minute fix to gain support for a vote that leaders now plan to hold Thursday.
President Trump initially criticized the $1-trillion spending package for failing to include his administration's priorities, but the House easily approved the funding measure, 309 to 118. The Senate was expected to swiftly follow, ahead of a Friday deadline when a current stopgap funding bill expires.
The package boosts defense spending by $12.5 billion, half of what the president wanted. It provides extra money for medical research, disaster relief and the effort to salvage a coal miners pension fund that was a top priority of both Democrats and Senate Majority Leader Mitch McConnell (R-Ky.).
Congress declined to provide money to build Trump's promised wall on the border with Mexico after lawmakers from both parties bristled at the expenditure, especially because Trump had insisted on the campaign trail that Mexico would pay for it. Instead, Congress settled on $1.5 billion in surveillance and other security measures, still the largest expenditure on the southwestern border in years.
Trump's initial criticism of the hard-fought compromise put him at odds with Republican leadership in Congress, who welcomed the deal as an important accomplishment that eases fears of a government shutdown until the fiscal year ends on Sept. 30.
"When you look at the bill, there's a lot of good conservative wins here," said House Speaker Paul D. Ryan (R-Wis.).
On Wednesday, the White House said Trump now agrees that the bill is a good deal for Americans.
Democrats used their leverage, providing votes necessary to overcome a split among Republican lawmakers and pass the measure.
On the healthcare bill, the White House was working anxiously to close a deal ahead of a Thursday vote that Majority Leader Kevin McCarthy announced following a Wednesday evening leadership meeting at the Capitol.
McCarthy said Republican leaders now have enough votes for passage.
Trump has been calling lawmakers who were wavering, and threw his support to a new amendment that aims to win back centrist Republicans worried that patients with preexisting conditions will lose coverage under the GOP bill, the American Health Care Act.
Reps. Fred Upton (R-Mich.) and Billy Long (R-Mo.), who had voiced opposition to the bill, reversed course and said they would support the measure after convincing Trump to back their plan for an additional $8 billion to help pay for coverage in state high-risk pools for uninsurable consumers.
Their support appeared to be bringing a trickle of other centrists on board. "With this addition that we brought to the president, sold him on, an hourlong meeting, we're both 'yeses' on the bill," Long told reporters afterward at the White House.
Still, in the face of opposition from Democrats, Ryan can lose no more than about 22 votes, and the bill has been teetering on collapse amid pressure to vote before lawmakers break Thursday for weeklong recess.
Leaders appeared to be picking up support one lawmaker at a time as they tried to reach the 216 needed for passage.
For example, after leaders won support from conservative holdout Rep. Paul Gosar (R-Ariz.) by promising him a future vote on a proposal to undo the so-called McCarran-Ferguson law, a longstanding ban on selling insurance across state lines. That also flipped Rep. Steve King (R-Iowa) to the "lean yes" column.
"It's a big deal," said King.
The latest proposal to add $8 billion over five years to help states' high-risk plans seeks to address a consistent criticism that these plans were historically underfunded and could never meet the demand for coverage from sick people who could not get commercial insurance on their own.
But it was quickly dismissed as inadequate by many healthcare experts and advocates for patients.
"This is like building a bridge less than one-quarter of the way across a river," former Families USA director and longtime patient advocate Ron Pollack noted in a tweet. "Anyone driving a car to the other side will still drown!"
Republicans who already oppose their party's healthcare overhaul as insufficient in repealing and replacing Obamacare said leaders were desperate to pass the bill and move on.
"The AHCA is like a kidney stone — the House doesn't care what happens to it, as long as they can pass it," tweeted Rep. Thomas Massie (R-Ky.), who is opposed to the measure.
4:25 p.m.: This article was updated after GOP leaders announced a vote Thursday on the healthcare bill.
4 p.m.: This article was updated with additional reaction and information about the GOP healthcare plan.