WASHINGTON — Senate leaders reached agreement Thursday on a $19.1 billion package to help states recover from natural disasters, including the California wildfires.

The deal came after the White House agreed to give up on its demand for $4.5 billion in humanitarian border aid to be included in the disaster bill. Congressional Democrats — who blame the border crisis on President Donald Trump's policies — said they wouldn't support the funding without new protections for asylum-seekers.

The Senate approved the bill 85-8 Thursday afternoon after all 100 senators agreed to fast-track the legislation. The House could approve the legislation as soon as Friday if GOP and Democratic leaders agree to pass it, even though most members of the House left Washington on Thursday for a weeklong recess.

The legislative breakthrough between top Republicans and Democrats in Congress came just a day after Trump suggested he would not approve any legislation unless Democrats stop their investigations into his administration.

The bill's funding can be used by states to address the consequences of last year's wildfires and hurricanes, including those in California and along the East Coast, respectively, as well as tornadoes and floods in the Midwest this year.

California will be eligible for up to $12.6 billion of the new spending, according to Sen. Dianne Feinstein, D-Calif. The bill will also make people who suffered losses from the Paradise fire eligible for rural development funds from the Department of Agriculture, money that would not have otherwise been available to them, according to Feinstein.

Such bills to respond to natural disasters were once relatively perfunctory in the Senate. But this package has been under debate for months, bogged down by political disputes.

The bill appeared unlikely to pass as recently as Wednesday. Sen. John Cornyn, R-Texas, blamed lawmakers for being unwilling to compromise.

"We got into this paradigm or game where it's a zero-sum operation, where somebody has to win and somebody has to lose, and that's not conducive to compromise," Cornyn said.

Republicans had earlier relented in a spat over safeguarding funding for Puerto Rico. The president had threatened to restrict future disaster aid to the island and Democrats included protections for Puerto Rico in the bill. The bill will provide about $1.4 billion in aid to the island.

Trump assured GOP Sens. David Perdue of Georgia and Richard Shelby of Alabama in a phone call Thursday afternoon that he would support the disaster package without the border funding.

Shelby, chairman of the Senate Appropriations Committee, credited Trump for enabling the breakthrough.

"I want to thank President Trump for breaking the gridlock and getting this disaster relief to Americans who so desperately need it," Shelby said. "We have been working on this package for several months, and I am pleased to say that help is finally on the way."

It was just six months ago that the government was partially shut down over Trump's demands for border security funding as part of a larger government spending bill. But the latest Trump request, rather than for a border wall, was intended to handle the surge of people arriving and being held at the border. Vice President Mike Pence had been pressing lawmakers to approve the humanitarian aid.

"I'm frankly a little bit surprised (Trump's) willing to leave that off," Cornyn said of the disaster bill.

Lawmakers said Thursday that they would continue to consider Trump's border funding request.

Eight senators, including Sen. Mitt Romney, R-Utah, voted against the disaster bill. The former GOP presidential candidate said the bill was loaded with "billions of dollars in unrelated pet projects."

"Instead of rushing through billion-dollar spending bills at the eleventh hour without sufficient input or debate, Congress needs to start budgeting for natural disasters," Romney said.