Democrats in the US House of Representatives have approved $4.5bn (£3.5bn) in humanitarian aid for the southern border.
Several migrant deaths, coupled with reports of “severely neglected” children at a Texan border patrol station, have helped shape the debate.
But the bill faces a tough path through the Republican-controlled Senate.
It is considering a rival bill with fewer restrictions on how border agencies can spend the money.
The Democrats’ version, in contrast, contains several strict rules setting out that the funds can be used for humanitarian aid only, and “not for immigration raids, not detention beds, not a border wall”, a statement from House appropriations committee chair Nita Lowey said.
The bill was toughened up after some Democrats expressed concern over providing extra funds for agencies involved in the current situation, including those enforcing President Donald Trump’s “zero tolerance” policy which leads to migrant children being separated from their parents.
With the extra safeguards, it passed 230 to 195, roughly along party lines – with a few Democrats still refusing to back it.
The White House said President Trump would be advised to veto the House bill if it landed on his desk “in its current form”.
Why is there a political crisis about the border?
Mr Trump’s “zero tolerance” policy was announced in early 2018. By prosecuting adults who crossed the border illegally, it had the effect of separating children from their parents.
Despite a court order requiring families to be reunited, more than a year later hundreds remained in government shelters, to which the public – including journalists and rights activists – had little access.
But lawyers were recently given access to one facility in Clint, Texas, by a judge. They reported appalling conditions inside, in which children under 10 were caring for infants, and massive overcrowding.
Children were “locked up in horrific cells where there’s an open toilet in the middle of the room” where they ate and slept, one of the lawyers told the BBC.
Separately, a legal argument from the government that access to soap and a toothbrush were not necessarily “required” has drawn much criticism.
Those feeling were re-ignited on Tuesday following a report that many of the children had been returned to the Clint facility just days after being transferred out amid the public outcry.
What has the reaction been?
“This situation is child abuse,” Democratic Speaker Nancy Pelosi said. “It is an atrocity that violates every value we have, not only as Americans, but as moral beings.”
But her Republican counterpart in the House, Kevin McCarthy, responded that “after weeks of doing nothing, and denying that a crisis exists, they are offering legislation that is misguided, and is purely political”.
Several bodies, including those of babies and children, were discovered on the border in recent days, as some migrants opted to try and cross into the US illegally, avoiding the formal immigration system.
A photograph of a father and his daughter lying face down in the water of the Rio Grande has also shocked many. In the photograph, two-year-old Valeria has an arm wrapped around her father, Oscar Alberto Martinez, as both lie dead close to shore.
Published by the Associated Press on Tuesday, it has drawn comparisons to the photo of young Syrian boy Alan Kurdi, who became a symbol of the human cost of the war in Syria.
Amid a major public outcry about the conditions facing migrant children, Customs and Border Protection acting commissioner John Sanders said he would be stepping down.
The acting director of Immigration and Customs Enforcement, Mark Morgan, is set to replace him.