Mexico has condemned the US policy on undocumented migrants, which involves separating children from their parents.
Footage has emerged of children locked up in metal cages, some crying for their parents, in holding centres on the US border with its southern neighbour.
Mexico is the first country to speak so forcefully against the policy, calling it “cruel and inhuman”.
Foreign minister Luis Videgaray told a press conference: “In the name of the Mexican government and people, I want to express our most categorical and energetic condemnation of this cruel and inhuman policy.”
Nearly 2,000 children have been taken from their parents since Jeff Sessions, the attorney general, announced the policy directing officials to refer all cases of illegal entry for prosecution.
This means parents are sent for federal court proceedings and separated from their children, who cannot be jailed under US law.
Mr Videgaray said Mexico “cannot remain indifferent in the face of something that clearly represents a violation of human rights”.
“We call on the United States government, at the highest level, to reconsider this policy and give priority to the well-being and rights of these boys and girls, regardless of their nationality and immigration status.”
Some 21 Mexican children had been identified as having been separated from their parents but most of the children affected are from Guatemala, El Salvador and Honduras.
Later, Canada’s immigration minister Ahmed Hussen said: “I think all Canadians are troubled by images coming out of the United States.
“The lives of children are very, very precious and their security and their well-being has to be foremost in our minds.”
The words come as Mr Trump comes under increasing pressure in his own country over the policy.
Some members of his party are demanding an end to it and the White House has said it is looking at emergency legislation intended to keep immigrant families together, tabled by Republican senator Ted Cruz, of Texas.
Donald Trump has remained defiant, using Twitter to blame the policy on Democrats and a fear of gangs and crime.
He said on Tuesday that he had only two options on immigration: separating migrant children from their parents at the border or “open borders”.
“I don’t want children taken away from parents,” he said.
“When you prosecute the parents for coming in illegally, which should happen, you have to take the children away.
“We don’t have to prosecute them, but then we are not prosecuting them for coming in illegally. That’s not good.”
Meanwhile, the Trump administration looks set to announce its departure from the United Nations Human Rights Council, after the body criticised the US for its treatment of children at the border.