Early one morning in February 2018, an undocumented immigrant named Ana was told to report to a government office within the shelter where she was being housed. A month earlier, she had fled to the United States from Guatemala with her 2-year-old son after gang members threatened to kill her. Because she was 17, immigration officials placed her and her son in the custody of the Office of Refugee Resettlement, which sent them to a shelter in New York. On this day—her 18th birthday—the staff instructed her to go to the office at 5 a.m. without her son. When she arrived, two Immigration and Customs Enforcement officers were waiting. They arrested Ana and transferred her to New Jersey’s Bergen County Jail. She was not allowed to say goodbye to her son.

What ICE did to Ana wasn’t just cruel. It was illegal. Under a federal law, the agency is required to place immigrants like Ana—undocumented minors who turn 18 in federal custody—in the “least restrictive setting available.” But under Donald Trump, ICE has ignored this rule, ripping immigrants out of shelters on their 18th birthdays and locking them in detention facilities with adults. Despite a raft of lawsuits challenging its actions, ICE continues to assert broad authority to imprison these teenagers. Its refusal to comply with the law is a powerful argument against calls to reform ICE instead of abolishing it.

In 2013, Congress enacted an amendment to the Trafficking Victims Protection Reauthorization Act (TVPRA) that should clearly protect immigrants like Ana from unnecessary incarceration. The statute was designed to safeguard unaccompanied immigrant children who turn 18 in ORR custody. Under the law, ICE must “consider placement in the least restrictive setting available” so long as these teenagers are not a risk to themselves or the community, or a flight risk. These individuals “shall be eligible to participate in alternative to detention programs,” such as placement “with an individual or an organizational sponsor, or in a supervised group home.”

There is no question that Ana and her son qualified for an “alternative to detention.” She posed no threat or flight risk, and family friends in Texas had already agreed to sponsor her and her son. This couple had already submitted the necessary paperwork, as well as their fingerprints, when ICE snatched Ana and put her in jail. At no point did the agency undertake its legal obligation to consider that a less restrictive alternative was plainly available.

After the National Immigrant Justice Center filed a lawsuit on behalf of Ana and two other 18-year-olds illegally imprisoned by ICE, the agency released her on humanitarian parole. A federal court then ordered the release of the two other plaintiffs, ruling that ICE had broken the law by detaining them upon their 18th birthdays without considering alternatives. ICE, the court wrote, had acted in an “arbitrary” and “capricious” manner, ignoring its “statutory obligations” in order to effect unlawful “deprivations of physical liberty.”

That decision spared the named plaintiffs, two 18-year-old immigrants, from further detention. But the court has yet to certify the NIJC’s class action on behalf of all similarly situated immigrants. And until it does, advocates must keep fighting these wrongful imprisonments on a case-by-case basis. Kate Melloy Goettel, a senior litigation attorney at NIJC, estimates that about 100 undocumented children in federal custody turn 18 each month. Unless the courts intervene, ICE will automatically imprison most or all of these teenagers.

A startling report published in the Miami New Times on Thursday provided a glimpse into the tactics ICE uses to traumatize these undocumented immigrants. At a shelter in Homestead, Florida, ICE agents routinely handcuff and shackle teenagers on their 18th birthdays and then transfer them to jail, often with no explanation. One teenager, Tomas Teletor Garcia, was separated from his father under the Trump administration’s “zero tolerance” policy. Another, Nolbiz Orellana, sought asylum after fleeing an abusive mother and gang members who threatened to kill him. On the day Orellana turned 18, ICE officials transferred him from the Homestead shelter to a for-profit adult immigrant detention center. At other shelters, ICE agents arrive a half-hour before an immigrant’s 18th birthday, then arrest them at midnight. Many of these teenagers are waiting for the government to approve potential sponsors when ICE arrives and transfers them to prison.

Unless the courts intervene, ICE will automatically imprison most or all of these teenagers.

“When they turn 18, it’s basically, ‘Happy birthday,’ and then they slap on handcuffs and take them off to adult detention centers,” Lisa Lehner, an attorney with the nonprofit Americans for Immigrant Justice, told Miami New Times. Since early July, Americans for Immigrant Justice has filed seven lawsuits on behalf of 18-year-old immigrants in Florida and plans to file several more in the coming weeks. In five of these cases, ICE released the teenagers to relatives or guardians in the U.S. while the cases make their way through the courts. The other two cases are still pending.

None of ICE’s actions here are legal. The TVPRA directs the agency to consider a “continuum” of less restrictive alternatives before locking up these immigrants. That includes group homes and institutional sponsors such as shelters for young adult immigrants. Another alternative is granting the teenagers their release and requiring them to make periodic check-ins. ICE should have at least considered these options for the children at Homestead and other shelters. Its failure to do so is a plain violation of federal law.

The Obama administration generally complied with this “least restrictive setting” requirement after its enactment. It also had to contend with fewer unaccompanied minors aging out of ORR custody. Under Barack Obama, ORR prioritized placing these children with sponsors—families or individuals with whom they could stay after turning 18. Now the agency takes much longer to place immigrant children with sponsors, leaving thousands languishing in shelters for months.

Goettel cited two reasons for the delays. First, ORR Director Scott Lloyd has given himself the responsibility to personally sign off on the release of immigrants to sponsors, creating a bottleneck. (Lloyd, who gained notoriety for denying abortions to undocumented minors, is a micromanager who reviews a weekly spreadsheet of each individual in ORR custody who has asked to terminate her pregnancy.) Second, under Trump, ORR has begun sharing information about potential sponsors and their families with ICE. In theory, undocumented immigrants who live in the United States can sponsor unaccompanied minors, and they frequently did under Obama. Now, however, they are justifiably concerned that ICE will detain and deport them if they attempt to become sponsors. Legal immigrants with undocumented family members are also understandably afraid to volunteer as sponsors and draw scrutiny to their relatives. The upshot has been a surge in children turning 18 while trapped in ORR custody.

ICE’s treatment of these teenagers is especially alarming because it is so blatantly unlawful. Individual ICE officers have been caught breaking the law plenty of times—forging documents, fabricating evidence, performing illegal arrests. But since Trump took office, the agency itself appears to have violated the TVPRA unceasingly as a matter of course. When challenged in court, ICE’s best defense for disregarding the law was that the vast majority of immigrants who turn 18 pose flight risks, so it is justified in imprisoning them. Put charitably, that argument is nonsense. Congress took care to enact special protections for this class of immigrants. As Goettel said, it cannot possibly be true that a desultory flight risk analysis “swallows the entire purpose of this statute.”

A federal court may soon compel ICE agents across the country to resume compliance with the law governing treatment of these 18-year-olds. But the courts cannot supervise ICE’s every move, and even if the NIJC’s class action succeeds, no judge can ensure that it always complies with court orders. The problem with ICE goes deeper than any one agent or even any one president. An agency this eager to torment immigrants is beyond reform. Congress cannot force ICE to follow the law when ICE is convinced that it is above the law. There is only one realistic solution to the manifold problems posed by this rogue agency: It must be scrapped altogether.