Nearly 600 children remain in government custody, including 410 who have had a parent deported, according to the filing. More than 300 are from Guatemala and another 100 are from Honduras. The rest are from El Salvador, Brazil and Romania, among other countries.

The children from New York are among the first to be reunited with deported parents.

They include Filomena, who turned 6 while in federal custody in New York, and who was described by the consul general of Guatemala, Nivia Rosemary Arauz Monzón, as a small girl with pigtails who, although she understands Spanish, mostly remains silent.

Filomena’s father, Nazario Jacinto Carrillo, is a farmer in Guatemala. His lawyers said he chose to be deported after he was separated from his daughter in May when they illegally crossed the border because — like many in his position — he believed deportation would be the fastest way to be reunited with her. He was wrong.

“He is relieved that he will have her back soon,” said his immigration lawyer, Erika Pinheiro, who is based in Los Angeles. “Nazario and his daughter have been separated for months, even though they had three attorneys working on their cases since before Nazario was deported.”

The path to get the eight children on a plane to Guatemala was one with many obstacles.

Over the course of this process, some children with deported parents have given caseworkers and lawyers enough information to locate their families, such as memorized phone numbers, according to Catholic Charities, which was charged with providing legal services for the hundreds of separated children sent to New York.

For others, lawyers and volunteers searched for parents using public records, then turned to officials and nonprofits in the home countries.

Once it was clear that the families wanted the children returned, and the government would not drop its deportation case against the children, the swiftest path toward getting them back home was what is known as a voluntary departure order, according to Anthony Enriquez, the director of the unaccompanied minors program for Catholic Charities.