A U.S. judge has blocked the government from deporting Guatemalan children who had crossed the border without their families.

HARLINGEN, Texas (AP) — With migrant children waiting on tarmacs to be sent to their native Guatemala, a federal judge Sunday temporarily blocked the flights, siding with attorneys for the children who said the government was breaking laws and sending their clients to potential peril.

The extraordinary drama played out overnight on a holiday weekend and vaulted from tarmacs in Texas to a courtroom in Washington. It was the latest showdown over the Trump administration’s crackdown on immigration — and the latest clash between the administration’s enforcement efforts and legal safeguards that Congress created for vulnerable migrants.

Guatemalan children who arrived at the border without their parents or guardians will stay for at least two weeks while the legal fight unfolds, according to the ruling.

“I do not want there to be any ambiguity,” said U.S. District Judge Sparkle L. Sooknanan.

Minutes after her hastily scheduled hearing, five charter buses pulled up to a plane at Valley International Airport in Harlingen, Texas, a hub for deportation flights. Hours earlier, authorities had walked dozens of passengers — perhaps 50 — toward the plane in an area restricted to government planes. Passengers wore colored clothing typically used in government-run shelters for migrant children.

All 76 children on the planes were expected to have been returned to shelters overseen by the U.S. Department of Health and Human Services by the end of Sunday, the Justice Department said in a court filing.

“This idea that on a long weekend in the dead of night they would wake up these vulnerable children and put them on a plane irrespective of the constitutional protections that they had is something that should shock the conscience of all Americans,” said Kica Matos, president of the National Immigration Law Center, which represents the children, following Sunday’s hearing.

The Homeland Security Department did not immediately respond to a request for comment on the ruling.

The chaotic, rapid-fire developments resembled a March weekend showdown over the deportation of hundreds of Venezuelans to a maximum-security prison in El Salvador. Advocates implored a federal judge to halt deportations they believed were imminent, while the Trump administration was silent about its plans.

In that case, the judge appeared in civilian clothes for a Saturday night hearing and tried to block the flights, but they went ahead, with the government saying the court order came too late.

The administration insisted it was reuniting the Guatemalan children — at the Central American nation’s request — with parents or guardians who sought their return. Lawyers for at least some of the children say that’s untrue and argue that in any event, authorities still would have to follow a legal process that they did not.

One girl said her parents, in Guatemala, got a strange phone call a few weeks ago saying the U.S. was deporting her, said one of the plaintiff attorneys, Efrén C. Olivares.

The 16-year-old, who’s been living in a New York shelter, said in a court filing that she’s an honors student about to start 11th grade, loves living in the U.S. and is “deeply afraid of being deported.”

Other children — identified only by their initials — said in court documents that they had been neglected, abandoned, physically threatened or abused in their home country.

“I do not have any family in Guatemala that can take good care of me,” a 10-year-old said in a court filing. A 16-year-old recalled experiencing “threats against my life” in Guatemala.

“If I am sent back, I believe I will be in danger,” the teen added.

Sunday’s court hearing came in a case filed in federal court in Washington, but similar legal actions also were filed elsewhere.

In a lawsuit in Arizona, the Florence Immigrant & Refugee Rights Project said one of its clients is a 12-year-old asylum-seeker who has chronic kidney disease, needs dialysis to stay alive and will need a kidney transplant. Two other plaintiffs, a 10-year-old boy and his 3-year-old sister, don’t have family in Guatemala and don’t want to return, according to the group.

As the developments played out in the U.S., families gathered at an air base in Guatemala’s capital, Guatemala City, in anticipation of the flights. Gilberto López said he drove through the night from his remote town after his 17-year-old nephew called at midnight to say he was being deported from Texas.

The boy left Guatemala two years ago, at age 15, to work in the U.S. and was detained about a month ago, López said.

Migrant children who arrive in the U.S. without their parents or guardians are routinely handed over to the Department of Health and Human Services’ Office of Refugee Resettlement. They often live in government-supervised shelters or with foster care families until they can be released to a sponsor — usually a relative — in the U.S.