These young immigrants are stranded at the junction of several forces: the Trump administration’s determination to discourage immigrants from trying to cross the border; the continuing flow of children journeying by themselves from Central America; the lingering effects of last summer’s family-separation crisis at the border; and a new government policy that has made it much more difficult for relatives to claim children from federal custody.

At the moment, the government’s rolls include hundreds of children in shelters and temporary foster care programs who were taken from an adult at the border, whether a parent, grandparent or some other companion. About 13,000 children who came to the United States on their own were being held in federally contracted shelters this month, more than five times the number in May 2017.

All of which means there are more children showing up more often to federal immigration courtrooms like Judge Zagzoug’s, at hearings that could determine whether they will be deported, reunited with their parents, or granted the asylum that their parents desperately want for them. They often sit at counsel tables alone, unaccompanied by any family and sometimes without even a lawyer.

Under the circumstances, the children in Courtroom 14, many of whom were from a shelter operated by the Cayuga Centers, were fortunate. Many were allowed to go home at night to a foster family, though they returned to the shelter by day. And they could count on lawyers from Catholic Charities, which receives funding from a nonprofit group to represent immigrant children in New York City shelters.

“We used to just deal with teenagers,” one lawyer, Jodi Ziesemer, said as she ushered children to the 14th floor before the hearings began. “Now they’re …” Her gaze swept the small group. Fernanda was gripping a green apple with both hands, occasionally taking a bite. As they moved down the hallway, her caseworker picked her up and carried her toward court.

In a spotlessly bright waiting room, Ms. Ziesemer’s colleague, Miguel Medrano, spent a few minutes trying to prepare Fernanda for court. He bent low to talk to her, asking her name, her age, whether she spoke English or Spanish. “Sí?” he prompted her. No response. He shook his head. “Well, if she can’t, she can’t.” He turned back to her and tried again in English. “So we’re going to see the judge,” he said gently. No response.