WASHINGTON — A modified version of President Donald Trump's $4 billion-plus request to care for tens of thousands of migrant refuges massing at the southern border swept through a key Senate panel Wednesday after senior lawmakers removed "poison pills" that Democrats objected to.

The Appropriations Committee approved the bill by a 30-1 vote, sending it on its way to an expected floor vote next week. The Democratic-controlled House has yet to unveil its version of the bill as House Speaker Nancy Pelosi has struggled to win support from the chamber's potent Hispanic Caucus.

The bipartisan vote likely means the Senate will take the lead in writing the legislation, which needs to pass into law before the House and Senate leave for vacation next week. A spokesman for House Appropriations Committee Chairwoman Nita Lowey, D-N.Y., said the panel has drafted its version of the measure and expects a bipartisan vote early next week.

The $4.6 billion legislation contains $2.9 billion to care for unaccompanied migrant children — more than 50,000 children have been referred to government care since October — and $1.3 billion to care for adult migrants. There's also money to hire new judges to decide asylum claims. All told, about 675,000 undocumented immigrants have crossed the border over that time.

The bipartisan session came after weeks of acrimony and just in time to avert a humanitarian disaster as money is about to run out. To win Democratic support, panel chair Richard Shelby, R-Ala., agreed to drop Trump's request for Immigration and Customs Enforcement detention beds and agreed to a Democratic provision to block any of the money in the legislation from being diverted to building a border wall.

"Let's stay with the humanitarian aid," Shelby said, describing his pitch to fellow lawmakers. "Let's keep the poison pills out."

The White House and Capitol Hill Republicans had sought to attach the emergency border funding to a popular disaster aid bill that passed Congress last month, but objections by House liberals and the Hispanic Caucus scotched the idea. But pressure has steadily built this month amid warnings that money to care for the surge of migrants is about to run out and that the situation would turn from a crisis into a catastrophe.

"Our facilities are bursting at the seams," said Sen. Shelly Moore Capito, R-W.Va.

Top panel Democrat Patrick Leahy of Vermont and others described terrible, overcrowded conditions in federal holding facilities.

"Children in our care are being forced to sleep under bridges, and families are being placed in outdoor pens without shelter," Leahy said.

Sen. Jeff Merkley, D-Ore., cast the sole "nay" vote, outlining a variety of concerns with the government's handling of the migrant crisis, including abuses by for-profit detention facilities.

"America is better than this," Merkley said. "The way we are treating migrant children, the way we are treating migrant families awaiting adjudication."

But both Democrats and Republicans praised the legislation, which contains $30 million to reimburse local governments and nonprofits who assist refugees.