EL PASO, Texas -- In an unmarked brick building a few blocks from the Mexican border, immigrant parents clutched folders of birth certificates and asylum paperwork and sat on folding chairs, waiting to use a single, shared landline phone.

They rushed to the phone as their names were called with word that a relative or government worker was on the line, perhaps with news about their children.

For days and weeks now, some of the hundreds of parents separated from their children at the Mexican border by the Trump administration have been battling one of the world's most complex immigration systems to find their youngsters and get them back.

For many, it has been a lopsided battle, and a frustrating and heartbreaking one. Most do not speak English. Many know nothing about their children's whereabouts. And some say their calls to the government's 1-800 information hotline have gone unanswered.

Now, at least, they have the legal system on their side, since a federal judge in California ordered the Trump administration Tuesday night to reunite the more than 2,000 children with their parents in 30 days, or 14 days in the case of those under 5.

But huge logistical challenges remain, and whether the U.S. government can manage to clear away the red tape, confusion and seeming lack of co-ordination and make the deadline remains to be seen.

The Justice Department and the Department of Health and Human Services, which is in charge of the children, gave no immediate details Wednesday on how they intend to respond to the ruling.

Anthony Romero, executive director of the American Civil Liberties Union, said he believes the deadline is realistic.

"It's a question of political will, not resources," he said.

Among the complicating factors: Children have been sent to shelters all over the United States, thousands of miles from the border. And perhaps hundreds of parents have already been deported from the U.S. without their children.

A woman in Guatemala who was deported without her 8-year-old son has had to find a U.S. lawyer from her cinderblock home on the outskirts of Guatemala City to help her get Anthony back.

Elsa Johana Ortiz applauded the federal judge's ruling but added, "As long as he's not with me, I will not be at peace."

In El Paso, three dozen parents released Sunday from a U.S. detention centre started a feverish search for their children, using the landline phone at a shelter run by Annunciation House.

Some of those at Annunciation House rushed to catch buses bound for New York, Dallas and the West Coast to live with family members in the hope that establishing residency will make it easier to get their kids back. Those who left for other cities carried little more than shopping bags stuffed with sandwiches and paperwork.

Digna Perez of El Salvador said she was separated from her 9-year-old son and 6-year-old daughter at the border on May 29. She spoke with them Monday by telephone and was alarmed to hear lethargic, distracted responses from her normally talkative son.

"It was like I was forcing the words out of him," she said. "He wasn't like that before."

She planned to travel to Houston to stay with family friends in an attempt to reclaim her children by showing there was a suitable home waiting for them.

Another asylum-seeker at Annunciation House, Wilson Romero, hoped to be reunited with his 5-year-old daughter Nataly in California -- at the home of his mother, a recent immigrant herself.

The 26-year-old father was separated from her by U.S. authorities in El Paso in May. In Honduras, he worked at a textile factory making logos for U.S. brands on the outskirts of San Pedro Sula, one of Latin America's most violent cities. He said he left his homeland so his daughter would have a chance at a career someday. Now he just wants to see her again.

"I pray to God it is soon," said Romero, who has a tattoo of his daughter's name on his right arm.

For many immigrants, the bureaucracy has become increasingly frustrating as they try to find their children.

Some have had to send for birth certificates and identity documents from Honduras and are waiting for them to arrive in the mail.

Some parents who are attempting to get their children placed with friends or relatives in the U.S. are being asked by the government to provide fingerprints of relatives along with utility bills and lease information, which many newly arrived immigrants don't have, said Jesse Bless, an attorney from Jeff Goldman Immigration in Boston, who is representing Lidia Karine Souza.

Souza, 27, turned herself and her son, Diogo, into U.S. authorities at the Texas border and requested asylum, arguing her life was in danger in her native Brazil. U.S. officials detained her in Texas and took her son on May 30 without telling her where he would be.

When she was released June 9, she said, another detained mother who had also been separated from her child told her to check a Chicago shelter, and there she found Diogo. They were allowed no more than weekly 20-minute phone calls, in which he begged her to get them reunited.

Souza, who moved in with relatives in Massachusetts, said she submitted 36 pages of documents that U.S. officials required to regain her child. But her son remains in custody; he was quarantined much of the time because he had the chickenpox. Now, Souza has been told her relatives need to be fingerprinted, and the soonest the boy could be released is late July.

He celebrated his ninth birthday Monday locked up.

She filed a lawsuit against the Trump administration. An emergency hearing is scheduled for Thursday.

Souza visited Diogo for the first time Tuesday. They embraced, and she kissed him over and over on his head and face, then grabbed his cheeks gently with her hands as they both cried.

"I missed you so much," she said in Portuguese.

Asked how he was, Diogo said: "I am better now."

----------

Watson reported from San Diego. Associated Press writers Martha Irvine in Chicago; Sonia Perez in Guatemala City; Will Weissert in McAllen, Texas, contributed to this report.