WASHINGTON — The Senate on Thursday passed a long-overdue $19 billion disaster aid bill by a broad bipartisan vote, but only after Democrats insisted on tossing out President Donald Trump’s $4.5 billion request to handle an unprecedented influx of migrants at the U.S.-Mexico border.

The relief measure would deliver money to southern states suffering from last fall's hurricanes, Midwestern states deluged with springtime floods, and fire-ravaged rural California, among others. Puerto Rico would get help for hurricane recovery from the legislation, which has more than doubled in size since the House first addressed the issue last year.

The Senate approved the bill by an 85-8 vote. House lawmakers have left for the Memorial Day recess but the chamber probably will try to pass the bill by voice vote Friday, said a spokesman for House Speaker Nancy Pelosi (D., Calif.).

Trump said he will sign it even though money to deal with the border has been removed.

“I didn’t want to hold that up any longer,” Trump said. “I totally support it.”

Much of the money would go to Trump strongholds such as the Florida Panhandle, rural Georgia and North Carolina, and Iowa and Nebraska. Several military facilities would receive money to rebuild, including Camp Lejeune in North Carolina and Offutt Air Force Base in Nebraska.

Disaster aid bills are invariably bipartisan, but this round bogged down.

After weeks of fighting, Democrats bested Trump and won further aid to Puerto Rico, the U.S. territory slammed by back-to-back hurricanes in 2017. Trump has feuded with the island's Democratic officials and has repeatedly misstated that Puerto Rico has received much more aid than it actually has.

Trump originally wanted no money for Puerto Rico before agreeing to $600 million for its food stamp program. But ultimately, Democrats said they secured about $1.4 billion, including money to help Puerto Rico's cash-poor government meet matching requirements for further disaster rebuilding efforts.

Talks this week over Trump's border request broke down, however, over conditions Democrats wanted to place on money to provide care and shelter for asylum-seeking Central American migrants. Talks were closely held, but aides said liberal and Hispanic forces among House Democrats could not come to terms with administration negotiators.

Senate Democratic leader Chuck Schumer of New York dictated the terms of the agreement because Majority Leader Mitch McConnell (R., Ky.) was in a procedural box. Schumer took a victory lap with reporters immediately after the vote, recounting how he bested Trump on money for Puerto Rico and then carried the day by forcing a vote on the natural disaster-only measure.

Schumer said the bill was exactly the same as what he and Vermont Sen. Patrick Leahy, the top Democrat on the Senate Appropriations Committee, proposed six weeks ago and "could have been passed then. It wasn't Democrats blocking it."

He said Democrats "insisted that Puerto Rico get the aid that it needed, along with the rest of America, and it is."

But border needs are increasingly desperate and lawmakers will face intense pressure to act when they return next month from vacation. Money to house and care for migrants is expected to run out in June.

The disaster aid bill is most urgently sought by southern Republicans such as Sen. David Perdue of Georgia, wanting to help farmers who lost billions of dollars when Hurricane Michael hit last fall during harvest season. Midwestern Republicans such as Sen. Joni Ernst of Iowa also pressed for the legislation.

Democrats filibustered the measure last month over Trump’s refusal to sign off on money to speed further disaster aid to Puerto Rico. But they didn’t pay a political price. Instead, pressure built on Republicans such as Perdue, and Trump agreed to sign the measure after a phone call with Perdue and the chairman of the Senate Appropriations Committee, Sen. Richard Shelby (R., Ala.).

"The president said, 'OK,'" Shelby said.

Democrats secured a provision that would block Trump from diverting any of the money in the bill for military projects toward building his border wall. Trump has declared a national emergency and has said he is considering transferring up to $3.6 billion from military construction to border barriers.