On the day she was set to see a US immigration judge in San Diego last month, Katia took every precaution.
After waiting two months in Mexico to press her case for US asylum, the 20-year-old student from Nicaragua arrived at the border near Tijuana three hours before the critical hearing was scheduled to start at 7:30 am.
But border agents didn't even escort her into the US port of entry until after 9 a.m., she said, and then she was left stranded there with a group of more than a dozen other migrants who also missed their hearings.
"We kept asking what was going on, but they wouldn't tell us anything," said Katia, who asked to be identified by her first name only for fear of jeopardizing her immigration case.
Bashir Ghazialam, a lawyer paid for by Katia's aunt in the United States, convinced the judge to reschedule her case because of the transportation snafu. Later, staff at the lawyer's office learned that at least two families in the group were ordered deported for not showing up to court.
Since it started in January, the rollout of one of the most dramatic changes to US immigration policy under the Trump administration has been marked by unpredictability and created chaos in immigration courts, according to dozens of interviews with judges and attorneys, former federal officials and migrants.
The program - known as the "Migrant Protection Protocols" (MPP) - has forced tens of thousands of people to wait in Mexico for US court dates, swamping the dockets and leading to delays and confusion as judges and staff struggle to handle the influx of cases.
In June, a US immigration official told a group of congressional staffers that the program had "broken the courts," according to two participants and contemporaneous notes taken by one of them. The official said that the court in El Paso at that point was close to running out of space for paper files, according to the attendees, who requested anonymity because the meeting was confidential.
Theresa Cardinal Brown, a former Department of Homeland Security official under presidents Barack Obama and George W. Bush, said the problems are "symptomatic of a system that's not coordinating well."
"It's a volume problem, it's a planning problem, it's a systems problem and it's an operational problem on the ground," said Brown, now a director at the Bipartisan Policy Center think tank. "They're figuring everything out on the fly."
US Customs and Border Protection (CBP) estimated that 42,000 migrants had been sent to wait in Mexico through early September. That agency and the Executive Office for Immigration Review (EOIR), which runs the nation's immigration courts, referred questions about the program's implementation to the Department of Homeland Security (DHS), which did not respond to requests for comment.
HUGE SURGE, FEW COURTS
The disarray is the result of a surge in migrants, most of them Central Americans, at the US southern border, combined with the need for intricate legal and logistical arrangements for MPP proceedings in a limited number of courts - only in San Diego and El Paso, initially. Rather than being released into the United States to coordinate their own transportation and legal appearances, migrants in MPP must come and go across the border strictly under US custody.
Some migrants have turned up in court only to find that their cases are not in the system or that the information on them is wrong, several attorneys told Reuters. Others, like Katia, have received conflicting instructions.
According to court documents seen by Reuters, Katia's notice to appear stated that her hearing was at 7:30 a.m., while another paper she received said she should arrive at the border at 9 a.m., well after her hearing was set to start. She decided to show up at the border before dawn, according to staff in her lawyer's office. Still, she wasn't allowed into the border facility until hours later. Ultimately she was never bussed to the San Diego court and was told her case was closed - a fate she was able to avoid only after frantically summoning her lawyer, Ghazialam, to the border.
Most migrants in MPP - including the two families who were deported from her group at the port of entry - do not have lawyers.
In open court, judges have raised concerns that migrants in Mexico - often with no permanent address - cannot be properly notified of their hearings. On many documents, the address listed is simply the city and state in Mexico to which the migrant has been returned.
Lawyers say they fear for the safety of their clients in high-crime border cities.
A Guatemalan father and daughter were being held by kidnappers in Ciudad Juarez at the time of their US hearings in early July but were ordered deported because they didn't show up to court, according to court documents filed by their lawyer, Bridget Cambria, who said she was able to get their case reopened.
Adding to uncertainty surrounding the program, the legality of MPP is being challenged by migrant advocates. An appellate court ruled in May that the policy could continue during the legal battle, but if it is found ultimately to be unlawful, the fate of the thousands of migrants waiting in Mexico is unclear. A hearing on the merits of the case is set for next month.
When the MPP program was announced on December 20, then-Homeland Security Secretary Kirstjen Nielsen said one of its "anticipated benefits" would be cutting backlogs in immigration courts.
In the announcement, the agency said sending migrants to wait in Mexico would dissuade "fraudsters" from seeking asylum since they would no longer be released into the United States "where they often disappear" before their hearing dates.
But the immediate impact has been to further strain the immigration courts.
A Reuters analysis of immigration court data through Aug. 1 found judges hearing MPP cases in El Paso and San Diego were scheduled for an average of 32 cases per day between January and July this year. One judge was booked for 174 cases in one day.
"These numbers are unrealistic, and they are not sustainable on a long-term basis," said Ashley Tabaddor, head of the national immigration judge's union.
To reduce the backlog, DHS estimates the government would need to reassign more than 100 immigration judges from around the country to hear MPP cases via video conferencing systems, according to the attendees of the June meeting with congressional staff.
Kathryn Mattingly, a spokeswoman for EOIR, said that the rescheduling was necessary to deal with the substantial volume of recent cases.
All told, the courts are now struggling with more than 930,000 pending cases of all types, according to EOIR.
As of August 1, 39% of the backlog in the San Diego court and 44% of the backlog in the El Paso court was due to MPP case loads, Reuters analysis of immigration court data showed.
Despite concerns over the system's capacity, the government is doubling down on the program.
In a July 26 notification to Congress, DHS said it would shift $155 million from disaster relief to expand facilities for MPP hearings, and would need $4.8 million more for transportation costs. DHS said that without the funding "MPP court docket backlogs will continue to grow."
Tent courts are set to open this month in Laredo and Brownsville, Texas, and so far more than 4,600 cases have been scheduled there to be heard by 20 judges, according to court data.
In Laredo, 20 to 27 tent courtrooms will provide video conferencing equipment so judges not based at the border can hear cases remotely, said city spokesman Rafael Benavides.
Brownsville's mayor Trey Mendez said last month that about 60 such courtrooms were likely to be opened, though he had few details. City manager Noel Bernal told Reuters that communication with the federal government about the plans has been "less than ideal."
At her next hearing in San Diego in mid-September, Katia hopes to tell a judge how her participation in student demonstrations made her a target of government supporters.
Meanwhile, she said, she is living with her parents and 10-year-old brother in a fly-infested apartment with broken plumbing outside Tijuana.
The whole group is seeking asylum because of their support for the protests, according to Katia, her mother Simona, her lawyers, as well as court documents.
Recently, family members said they witnessed a shootout on their corner and Katia's brother is now waking up with night terrors.
"They are playing games with the needs of desperate people," said Simona, 46, who like Katia requested the family's last names be withheld to avoid harming their case. "It's soul crushing."