Image copyright EPA Image caption Migrant families in McAllen, Texas wait to be processed

A US judge has given the Trump administration more time to reunite migrant children aged five or younger with their parents.

The decision came after a government lawyer said more than half of the 102 young children may be back with parents by the original deadline of Tuesday.

They are among more than 2,300 children separated from parents prosecuted for illegally crossing the border.

The adults say they have fled poverty and gang violence in Central America.

The American Civil Liberties Union (ACLU) said that after viewing a list of the 102 children under the age of five in the government's care, "it appears likely that less than half will be reunited" by the 10 July deadline.

However, during a hearing on Monday, Department of Justice lawyer Sarah Fabian said 54 of the children should be back with their parents by Tuesday.

At the hearing in San Diego Judge Dana Sabraw agreed that some cases "will necessitate additional time" for reunification.

Immigration authorities have offered little information about reunification or what comes next.

Lawyers have described migrant toddlers clambering on court desks during hearings, forced to appear in court alone while their parents are detained.

Meanwhile, a federal judge in Los Angeles has rejected the Trump administration's request to allow the long-term detention of illegal immigrant children.

Under a 1997 agreement, child migrants can only be detained for 20 days.

Judge Dolly Gee said the administration's request to extend that limit was " a cynical attempt" to shift immigration policymaking to the courts.

What's happening on the ground?

Pamela Florian, a lawyer with The Florence Project, an Arizona non-profit providing legal and social services to detained immigrant families, told the BBC the family separation policy led to "a huge increase in the number of younger children" coming through the system.

"Now we're seeing toddlers, we're seeing babies," she says.

Last week, the government offered the following information:

16 children have not yet been matched to parents

19 parents have already been released into the US

46 parents are being held in custody by Immigration and Customs Enforcement (ICE)

Two parents have been judged unfit for release

On Twitter, immigration lawyers have shared their experiences representing young children who cannot properly explain their situation, let alone navigate legal proceedings.

Fellow Florence Project attorney Maite Garcia currently represents four- and six-year-old siblings from Mexico whose mother is in custody, awaiting her asylum hearing.

The six-year-old is blind, but has been working with Ms Garcia since her younger brother is nonverbal - "in part because he's traumatised", according to Ms Garcia.

"She's finally understanding after many, many meetings that she risks deportation and so now she's more frightened than ever of returning.

"She's been able to confide to me that she's fleeing violence in her home country and doesn't want to return because she's afraid of, as she puts it, 'bad things happening'".

Image copyright EPA Image caption Migrant families being moved to other immigration facilities in Texas

Oregon lawyer Lisa LeSage from the nonprofit Immigration Counseling Service (ICS) firm says the children often do not even know what a lawyer is.

"Often times with the young children, they might be crawling around or playing with a pen," Ms LeSage told the BBC of her in-court experiences.

"Even a five year old who wasn't traumatised can't always tell you their address or what their parents look like or their last names. How do you expect a child to do all that?"

ICS currently has around five children they have confirmed were separated from their parents at the border, but the numbers keep changing.

"This is not something that the kids or their parents will ever get over," Ms LeSage says. "I can say across the country, we know of cases where parents have already been deported."

"It's a horrific situation right now, there's really no other word for it."

What's the legal situation?

Much of the confusion around reunification stems from the fact that adults and children go through two separate immigration systems controlled by two different agencies.

Adults must go through the Department of Homeland Security (DHS) while children classified as unaccompanied minors are in the care of Health and Human Services' Office of Refugee Resettlement (ORR).

Media playback is unsupported on your device Media caption Cisary Reynaud has not spoken to his daughter since they were separated

Judge Ashley Tabaddor, president of the National Association of Immigration Judges (NAIJ), has volunteered with juvenile immigration cases in Los Angeles for years. She told the BBC the current migrant crisis has exacerbated the existing challenges of handling children's cases.

"It makes it even more difficult for the attorneys and for the court to ensure fundamental fairness because we need to ensure the proper adults are involved to fully protect the child's interests," she says.

"These are not unaccompanied children," Judge Tabaddor says.

"They are turned into an unaccompanied child when separated."

She added that now, many parents are "agreeing to whatever the government is asking for, to get their children back".

Media playback is unsupported on your device Media caption Zero-tolerance: The US policy dividing families and opinion

What about due process?

In June, President Trump called for deportation "with no judges or court cases".

Press Secretary Sarah Sanders later echoed Mr Trump's comments.

"Just because you don't see a judge doesn't mean you aren't receiving due process," Ms Sanders said.

Judge Tabaddor of the NAIJ said the organisation "respectfully disagree[s]".

"Due process and these situations require a person to present their case before an independent decision maker," she says.

"Once they're here and they express a fear of going back, they are entitled to come before an immigration judge."

Image copyright Getty Images Image caption An El Salvadorean migrant and his 10-year-old son were reunited last month after being separated while he was detained

Ms Garcia called any rollback on due process protections "a step in the wrong direction".

"Reunification is absolutely important. We advocate for the release of these families together - not family detention," she says.

"However, all of that shouldn't be more important than returning them to their countries without due process and without access to counsel."

Since immigration cases are civil cases, legal counsel is not automatically provided.

For migrants, finding legal representation can be next to impossible without help from non-profit organisations.

Image copyright Getty Images Image caption A Honduran mother and her two-year-old daughter wait on the Mexico side of the border after being denied entry into the US

What might happen in the coming days?

Judge Tabaddor says if immigration cases for children are pushed through before reunification, parents could unintentionally lose legal rights to their child.

"If the child ends up having to go through official foster care guardianship through the special immigrant juvenile visa, one of the things that has to be demonstrated is abandonment, abuse or neglect. If the court finds that, then the parent-child relationship is severed, at least for immigration purposes."

But staff at the Florence Project told the BBC it's still too early to worry about court rulings.

For now, ensuring migrant families have access to legal counsel and trauma care are the primary concerns.

A brief legal timeline

6 April: Sessions issues "zero tolerance" policy at the US-Mexico border

15 June: DHS finally reveals number of separated children - around 2,000 from late April to 31 May

20 June: Trump signs executive order ending family separations

21 June: House lawmakers request an audit from immigration agencies on migrant children and families

26 June: A federal judge in California orders officials to stop detaining families separately and mandates the government reunify families with children under the age of five within 14 days

27 June: Seventeen states sue the Trump administration to force family reunification

29 June: Legal organisations file lawsuit accusing Department of Health of mistreating migrant children in shelters

30 June: Sessions files announcement saying detaining families together indefinitely no longer violates the 20-day limit on detaining children from Flores Settlement

2 July: Senators demand updates from Homeland Security and Health departments on reunification

10 July: Federal judge allows deadline for children under five to be reunited with families to be pushed back in some cases

26 July: Deadline for all migrant families to be reunited