US lawmakers are scrambling to salvage a military aid package for Ukraine and Israel, after the Senate rejected a bipartisan border deal.
The failed compromise had bundled US-Mexico border restrictions together with aid to Ukraine and Israel.
But the pact, which was four months in the making, collapsed after Donald Trump urged Republicans to block it.
Republicans said its immigration reforms did not go far enough, while some Democrats said they went too far.
Senators are now trying to fashion a new version of the legislation.
Democratic Senate Majority Leader Chuck Schumer has put forward a back-up bill, which strips out the immigration measures while leaving the foreign aid intact.
The $96bn (£76bn) package includes $60bn of support for Ukraine, $14.1bn in security assistance for Israel - as well as $9.15bn in humanitarian aid for the situations in Israel and Ukraine.
Another $2.44bn is in the bill to back US operations in the Red Sea, and $4.83bn is allocated to support US allies in the Indo-Pacific "and deter aggression by the Chinese government".
Senate adjourned until Thursday after becoming mired in negotiations over the revised package.
Chuck Schumer, the top Senate Democrat, told reporters he wanted "to give our Republican colleagues the night to figure themselves out".
The original bipartisan border deal failed to advance in the Senate on Wednesday afternoon by a vote of 49 to 50. It needed 60 votes.
The $118bn package included about $20bn of funding for the US-Mexico border.
Among the most significant elements related to immigration in the 370-page deal was a new federal authority that would have mandated a complete shutdown of the border when migrant numbers at ports of entry reached a certain threshold.
In practice, this would have meant that migrants who arrive in the US illegally after that threshold is reached would no longer be allowed to request asylum and would be deported shortly thereafter.
But Republicans rejected the measure before any legislative text had been unveiled, arguing its border reforms did not go far enough.
Immigration has emerged as the top issue driving Republicans to the polls in support of Mr Trump, who is the frontrunner to face President Joe Biden in the November general election.
Mr Trump urged his party to reject the deal, even publicly proclaiming at a recent campaign rally: "Please blame it on me."
As support for the bill fell away, Republican House Speaker Mike Johnson and his leadership team declared the bill "a waste of time" because it would be "dead on arrival" in his chamber.
Senate minority leader Mitch McConnell had previously backed and actively participated in negotiations over the bill.
But the Kentucky Republican reversed course earlier this week, saying the package "has no real chance of becoming law", and he voted 'no' on Tuesday.
The next three most senior Republicans in the upper chamber - John Cornyn of Texas, John Thune of South Dakota and John Barrasso of Wyoming - also voted against the bill.
Only four Republicans backed the measure. That included lead negotiator James Lankford of Oklahoma, who reminded colleagues in a futile final pitch that Americans sent them to Washington to "get stuff done and solve problems".
Six Democrats also voted against the bill, mostly in opposition to its border reforms.
Speaking at a private fundraiser in New York on Wednesday evening, Mr Biden - who had endorsed the deal - said Republicans were "walking away because they've got Donald Trump calling and threatening them".
US military aid to Ukraine has been on hold since December because Congress has not been able to agree to send more. Republicans had said they would only support more aid for Ukraine if they got extra measures to tackle the border crisis - hence why the bipartisan bill, which has now been rejected, was drawn up.
The US is, by some stretch, the biggest provider of aid to Ukraine, and Ukraine has warned that the war effort and its public finances are at risk if further Western aid is not forthcoming.
Earlier, the White House National Security Adviser Jake Sullivan - who was in Brussels for talks with the head of Nato - said the US "can and will" deliver the needed aid despite a "lot of toing and froing" in Congress.
On Tuesday, Republicans in the House of Representatives tried spinning off the Israel aid into its own package, but it failed after Democrats overwhelmingly rejected it.