US President Donald Trump has signed an executive order promising to "keep families together" amid fury over separations of undocumented child migrants from adults.
It was not immediately clear when Mr Trump's order would be implemented.
"I did not like the sight of families being separated," he said, at the signing ceremony but added the administration would continue its "zero tolerance policy" of criminally prosecuting anyone who crosses the border illegally.
The president's U-turn on the separation of children from their parents comes amid growing fury across the US's political spectrum over the detention of children, some as young as seven months old.
Pictures of dozens of children sleeping in fenced enclosures and audio of crying children sparked anger in the US from groups ranging from clergy to influential business leaders, as well as condemnation from abroad, including Pope Francis.
The executive order states that immigrant families will be detained together, except in cases where there are concerns about the child's welfare, but it is unclear for how long. It also calls for prioritising immigration cases involving detained families.
The president said his wife, Melania, and daughter, Ivanka, who reportedly have been applying pressure on him to drop the policy in recent days, "feel strongly" about ending the practice of separating migrant families.
Earlier, Republican congressional leader Paul Ryan said the House of Representatives will vote on Thursday "on legislation to keep families together".
He did not immediately provide details of the bill, but said that it resolves the issue of so-called Dreamers, undocumented adult migrants who entered the US as children, "in a very elegant way".
The Trump administration still faced legal challenges because of a court order that put a 20-day cap on how long immigration authorities may detain minors, and trigger fresh criticism of Trump's hardline immigration policies, which were central to his 2016 election campaign and now his presidency.
Administration officials were unable to clarify whether family separations would end immediately or when and how families now separated would be reunited.
Mr Trump's order, an unusual reversal by him, moves parents with children to the front of the line for immigration proceedings but it does not end a 10-week-old "zero tolerance" policy.
The separations began after Attorney General Jeff Sessions announced in early April that all immigrants apprehended while crossing the US-Mexico border illegally should be criminally prosecuted.
Mr Sessions announced a "zero-tolerance" policy to criminally charge and jail undocumented border crossers.
As children cannot legally be jailed with their parents, they are kept in separate facilities.
US immigration officials say 2342 children were separated from 2206 parents between 5 May and 9 June.
Babies and toddlers have been sent to three "tender age" shelters maintained by the Department of Health and Human Services, the Associated Press news agency reports.
Under previous US administrations, immigrants caught crossing the border for the first time tended to be issued with court summonses and released.
The domestic US backlash to the policy has been echoed overseas.
The UK and Canadian prime ministers, Theresa May and Justin Trudeau, both called it "wrong".
Pope Francis said he supported US Catholic bishops who described it as "immoral".
French far-right leader Marine Le Pen, who in the past has praised Mr Trump's policy of curbing immigration, told French TV that she disagreed with splitting children from parents.
Acting Prime Minister voices opinion
The Acting Prime Minister said he was pleased the United States was putting a stop to the separation of children from their parents at the Mexican border.
Winston Peters, who was also the Foreign Minister, said the coalition government conveyed its concerns about the practice to the US Embassy in Wellington yesterday afternoon.
The Greens, human rights groups and others had been questioning why New Zealand had not yet condemned the policy.
Mr Peters said the separating of families was concerning many New Zealanders, and he welcomed Mr Trump's signing of a new executive order to allow "family unity."
He said it appeared Mr Trump has heeded the outcry on this matter.
- BBC / Reuters