WASHINGTON (AP) — A federal judge ruled on Wednesday that the Trump administration must give more than 100 migrants sent to a notorious prison in El Salvador prison a chance to challenge their deportations.

U.S. District Court Chief Judge James Boasberg said that people who were sent to the prison in March under an 18th-century wartime law haven’t been able to formally contest the removals or allegations that they are members of the Venezuelan gang Tren de Aragua. He ordered the administration to work toward giving them a way to file those challenges.

The judge wrote that “significant evidence” has surfaced indicating that many of the migrants imprisoned in El Salvador are not connected to the gang “and thus languish in a foreign prison on flimsy, even frivolous, accusations.”

Boasberg gave the administration one week to come up with a manner in which the “at least 137” people can make those claims, even while they’re formally in the custody of El Salvador. It’s the latest milestone in the monthslong legal saga over the fate of deportees imprisoned at El Salvador’s notorious Terrorism Confinement Center.

After Trump invoked the Alien Enemies Act of 1798 in March and prepared to fly planeloads of accused gang members to El Salvador and out of the jurisdiction of U.S. courts, Boasberg ordered them to turn the planes around. This demand was ignored. Boasberg has found probably cause that the administration committed contempt of court after the flight landed. El Salvador President Nayib Bukele posted a taunting message on social media — reposted by some of Trump’s top aides — that read “Oopsie, too late.”