McALLEN, Texas (AP) — The U.S. still separates some migrant children from parents while holding them after they cross the border despite broad improvements at detention centers in Texas, according to a court-ordered monitor’s final report.

The heightened scrutiny of the Border Patrol’s Texas holding facilities is part of broader court-appointed oversight, which President-elect Donald Trump and his allies have criticized.

The report, issued Friday under a monitoring agreement that began in 2022, offers a final glimpse into conditions inside the facilities ahead of Trump’s return to office. The report noted improvements to hygiene, food and medical care but found that U.S. Customs and Border Patrol agents routinely separated children from adult relatives during their time in custody.

Unlike separations that happened under Trump’s zero tolerance border policy during his first term, those noted in the report were temporary and did not involve sending adults to Immigration and Customs Enforcement detention while they were criminally prosecuted and children to shelters for minors.

At a facility in Donna, Texas, in September, agents “continued to routinely hold children separately from parents or trusted adults,” the report said. By November, the monitor called regular visits among family at the same facility “encouraging.” Workers at the facility said they could arrange visits because it was no longer overcrowded.

CBP said they issued new guidance on family unity and increased training on detention policies, guidelines and regulations.

“Over the past two years, CBP has undertaken extensive measures to significantly expand and enhance its support efforts in both scope and scale for persons in custody, especially vulnerable populations such as children,” the agency said in a statement.

Advocates sued the Trump administration in 2019, citing reports of children in federal custody who described overcrowding at CBP facilities in Texas, as well as unsafe and unsanitary conditions. That year, nearly 70,000 migrant children entered federal custody, enough to exceed the of capacity a typical NFL stadium.

A 2022 court agreement created a temporary monitoring system that required CBP to provide adequate medical care and supervision. It also required keeping families together or allowing contact for those held separately in custody.

Last week’s report noted medical care improved in 2024 but also found hesitancy in sending sick children to a medical facility. In 2023, when CBP was struggling with overcrowding, an 8-year-old girl with heart problems died while in custody in the Rio Grande Valley.

The monitoring agreement ends Jan. 29, 2025, more than a week into Trump’s second administration. Leecia Welch, the deputy litigation director at Children’s Rights who represents children in CBP custody under the Flores settlement, expressed concern about what will happen to children without the agreement’s oversight.

“The report highlights the crucial role the independent monitors are playing to keep children safe and shows that CBP is very far from meeting its obligations — let alone ready for self-monitoring,” Welch said in a written statement.

Broader court oversight of facilities began in 1997 under what is called the Flores settlement, after Jenny Flores, a girl from El Salvador who sued the U.S. government in the 1980s. It was partially lifted in June when the Justice Department argued that new safeguards would in some ways exceed the Flores settlement’s standards.