(Reuters) - A U.S. federal judge on Friday ordered the government into mediation to resolve serious concerns about the treatment of migrant children at crowded U.S. border patrol facilities in Texas.

The judge in U.S. District Court in Los Angeles overseeing a decades-old legal settlement governing the treatment of detained migrant children had been asked by the children’s attorneys to issue an emergency order to send public health experts and doctors to the border patrol facilities in the El Paso and Rio Grande sectors.

Last week, the lawyers raised alarm after seeing what they described as “deplorable” conditions for hundreds of children, who the attorneys said were held without sufficient food, water and sanitation.

A surge of mostly Central American families crossing the U.S.-Mexico border has strained border patrol facilities and pushed Congress to pass emergency spending measures. On Thursday, the government said the requests by the children’s attorneys would “impose extensive obligations” on the government and went beyond the terms of the settlement.

Judge Dolly Gee, who oversees the so-called Flores agreement, said a mediation could resolve concerns more quickly. The case has a court-appointed monitor, who she said could set deadlines and take measures to address the issues.

She pointed to past orders on violations of the agreement for similar issues, and said “the parties need not use divining tools to extrapolate” what constitutes noncompliance, she wrote. “The Court has made that clear beyond peradventure.”

The judge asked the parties to file a joint status report by July 12 about what has been done to address the conditions described by the children’s attorneys.