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 had last year led 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 and an end to separations last year, 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.
Five questions about the border crisis
Where do these people come from?
Traditionally large numbers of Mexican economic migrants have declined, replaced in part by a surge in families with children from Central American countries – particularly Guatemala, Honduras, and El Salvador.
Why are they fleeing?
Many of these families are fleeing extreme poverty or the risk of gang violence. The UN refugee agency calls the three countries „some of the most dangerous places on Earth“ – but the US attorney general has decreed that gang violence does not usually qualify someone for asylum.
Why are there still separated children?
Although the separation of migrant families was officially halted in June 2018, the New York Times reported that 700 families had been separated in the year since via „loopholes“ in the court order – when parents have a criminal conviction or a disease, or when it is an aunt, uncle, or sibling accompanying the child. Some parents may be children themselves.
How many people cross the border?
US Border Patrol says it has made 593,507 „southwest border apprehensions“ since October 2018. Last month, 132,887 people were stopped – including 11,507 unaccompanied children and 84,542 travelling in families.
How many people have died?
Border Patrol recorded 283 deaths in the 2018 fiscal year. The United Nations Missing Migrants project reports that so far in 2019, 170 migrants have died or are missing on the US-Mexico border – including 13 children.
Fatalities on US-Mexico border
Recorded in US areas by fiscal year
Separately, a legal argument from the government that access to soap and a toothbrush were not necessarily „required“ has drawn much criticism.
The lawyer making those technical arguments later posted to Facebook privately distancing herself, NBC reports, saying she personally believed in „doing our very best“ for children in care.
But the public outcry was 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 river has also shocked many. In the photograph, two-year-old Valeria has an arm wrapped around her father, Óscar Alberto Martínez Ramírez, 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.