A federal judge in Manhattan heard arguments Monday on a class action case that could determine whether undocumented immigrants in New York between the ages of 18 and 21 can stay in the country legally if they’ve been abused or abandoned by a parent.

Attorneys representing five young adults in New York claimed that it was “arbitrary and capricious” for the Trump administration to deny Special Immigrant Juvenile (SIJ) status to those over 18 last year, because Congress authorized the program in 1990 for immigrants up to the age of 21.

The plaintiffs are anonymous, but include a young woman who was abandoned by her parents in the Dominican Republic and who’s lived in the Bronx with her grandmother since she was a baby, and a 20 year-old in Brooklyn who was rejected even though his younger sister was accepted and they had the exact same circumstances. Monday’s hearing drew so many local attorneys who represent young immigrants that the courthouse needed an overflow room to accommodate all of them.

The case was brought by the Legal Aid Society and other public defenders. Robert Malionek, a partner at Latham & Watkins who also worked on the suit, told the court the government was rejecting many of the same young immigrant applicants the program was intended to serve, and that they are now unable to get jobs or apply for financial aid to college because they don’t have legal status.

To apply for SIJ status, a young person must be appointed a special guardian by a juvenile court because they were abused, neglected or abandoned by one or both parents. They have to be under 21 and unmarried, and the juvenile court also has to find it’s not in their best interest to return to their home country.

Much of Monday’s arguments focused on the definition of a juvenile court. Tomoko Onozawa, of the U.S. Attorney’s Office in Manhattan, argued for the government that children go to Family Court in New York when they need a guardian, which is different from a juvenile court because it can’t make determinations on family reunification.

But attorneys for the plaintiffs, and the state Attorney General’s office, argued that was a distinction without a difference, because Family Court has the same functions. The government’s claims also frustrated U.S. District Judge John Koeltl. He asked if the definition of a juvenile court means it must have the jurisdiction to place a child back in the custody of an unfit parent. That elicited a long pause.

“That shouldn’t be a hard question,” the judge stated.

After Onozawa repeated that a juvenile court must be able to reunite a child with a parent even if they have previously been found unfit, the judge replied, “What sense does that make?”

The government lawyer then replied that child welfare law contemplates reunification with a parent if circumstances change.

Onozawa also denied any change in policy under the Trump administration for young immigrants, and said U.S. Citizenship and Immigration Services was simply applying an existing definition to new applications for SIJ, now that one office in Missouri is handling all of them.

But Koeltl didn’t appear to buy that argument, either. “You say it was always the policy,” he said. “But if that’s true, up until 2018 all of the immigration judges deciding SIJ applications in New York were wrong.”

After the hearing, Malionek said he thought the government’s logic was faulty in suddenly deciding 18 to 21-year-olds could no longer apply for SIJ in New York. “I think their argument comes down to a complete misinterpretation of the federal law,” he stated.

A similar federal lawsuit has been filed in California, another state that allows young immigrants to apply for the special status until they turn 21.

The New York judge also heard arguments on a related case, involving one young Guatemalan man who was denied SIJ because the federal government disagreed with a family court’s decision that he was eligible. The government argued that the court didn’t have all of the relevant evidence about the immigrant’s possible gang affiliations.

Elizabeta Markuci, director of the immigration project at Volunteers of Legal Service, was among the many local lawyers attending Monday’s hearing. She said she felt validated by the judge’s apparent exasperation with the government’s arguments.

“To have a judge sort of call that out in a formal way and put them to task felt very reaffirming about the work that we're doing with the young people that we are trying to support.”

Beth Fertig is a senior reporter covering courts and legal affairs at WNYC. You can follow her on Twitter at @bethfertig.