The United States and Mexico on Tuesday vowed to work with Central American nations to reunite migrant families separated at the US border "as quickly as possible" as the Trump administration faced fresh criticism over the practice.

More than 2,300 children were separated from their parents after US President Donald Trump's government began a "zero tolerance" policy in early May, seeking to prosecute all adults who crossed the US-Mexico border illegally.

Trump stopped separating children from their parents last month following public outrage and court challenges.

US Homeland Security Secretary Kirstjen Nielsen met with Mexico's foreign minister, Luis Videgaray, and ministers from Central America in Guatemala City to discuss the separations and how to beat the criminal gangs profiting from migration.

"We remain very committed to re-unifying the families that have been separated as a result of illegal entry, and we will work with our colleagues here to repatriate as quickly as possible," Nielsen told reporters at a news conference.

Videgaray, who repeated his criticism of the policy, calling it "inhumane", made the same pledge. The ministers also vowed to do more to crack down on people smugglers preying on migrants.

Guatemalan authorities said that 11 reunited family groups comprising 131 people were flown back to the country in one of two flights carrying deportees on Tuesday.

A Guatemalan migration official said access to the family groups was restricted. But other deportees still waiting to be reunited with families went to protest their plight outside the hotel where the ministers were meeting in Guatemala City.

Elsa Ortiz, 25, said she had not seen her 8-year-old boy Anthony since the two were detained in Del Rio, Texas, and then separated by border patrol officials in May.

"The days are passing, and I miss him, that's why I came to ask Donald Trump that he gives me back my little boy soon," Ortiz said, adding they had gone for a better life. "I think two months are enough punishment for mothers to learn, and for them not to set off again on journeys they shouldn't set off on."

The ministerial gathering came as a judge said the US government must rapidly reunite 63 children under the age of five who were separated by immigration officials after crossing the US-Mexico border, or face penalties.

On Monday, US District Court Judge Dolly Gee in Los Angeles dismissed the US Justice Department's request to allow long-term detention for children who entered the United States illegally. The department had sought to modify a 1997 settlement allowing such children to be held for up to 20 days.

Trump on Tuesday pushed back against the court rulings, saying immigrants should not come to the United States illegally: "I have a solution: Tell people not to come to our country illegally. That's the solution," Trump told reporters at the White House.

"Come legally. We have laws. We have borders. Don't come to our country illegally. It's not a good thing," he added.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.