The boys fidgeted quietly on the courtroom bench, spotless in ties and matching button-up pastel shirts — donations, presumably, from the federal shelters in which many of them have been detained alone for weeks.

For some, this hearing on the ninth floor of a downtown Houston high rise would return them to the gang violence and poverty crippling El Salvador, Honduras and Guatemala. Others would gain more time to plead their case and reunite with their families in the United States.

“You’re here in court today because the government of the United States claims you’re not a citizen,” Judge Chris Brisack said Tuesday. “You’re here in violation of the law.”

The teenagers stared blankly. They are part of a record 14,030 immigrant children in shelters across the country as of Nov. 15, including more than 5,600 in Texas, according to new federal and state statistics released to the Houston Chronicle this week. The number of detained children rose in one day to 14,056 as of Nov. 16, the San Francisco Chronicle reported last week.

In all it is almost three times the number of children in federal detention a year ago, and more than during the Central American child crisis in 2014 that marked the beginning of the exodus from the so-called Northern Triangle countries. Their arrivals have infuriated President Donald Trump, who is limited in what he can do to stop them from seeking asylum.

LEGAL LIMBO: Her husband murdered, her son taken away, mother seeks asylum

The government has had to scramble for more space to hold the children, including placing about 1,800 in a West Texas tent camp. A proposed shelter in downtown Houston is under litigation, with Southwest Key Programs, a Texas nonprofit housing many of the nation’s immigrant children under more than $400 million in federal contracts, accusing the city of wrongly blocking its efforts.

The number of detained minors began ballooning this summer after Trump’s “zero-tolerance” policy separated parents from their children at the southern border. Usually detention facilities were seen as a temporary holding space for migrant children who came here alone. Typically most were quickly released to their families in the United States while they pursued their immigration cases.

Under a California judge’s orders, most of the separated families have now been reunited, and almost all of the children currently in shelters came here on their own.

That shelters are nearing capacity is not because significantly more migrant children are coming to the United States. In October, almost 5,000 unaccompanied minors were apprehended at the southern border, about in line with previous months.

More than 50,000 unaccompanied children came here in the fiscal year ending in September, higher than the approximately 41,400 children in 2017, which was largely seen as an anomaly after Trump took office and escalated harsh rhetoric on illegal immigration, including threatening to separate parents and children at the southern border -- as his administration later did.

The number of children coming here alone in 2018 was lower than 2016, when almost 59,700 children arrived, and significantly less than 2014, the height of the Central American child crisis. In that year, more than 68,500 children were apprehended at the southern border, including more than 10,500 that June. the highest on record.

By comparison, the number of children streaming across the border alone since October 2017 has averaged about 4,200 a month in the last fiscal year.

The historic high currently in shelters appears largely because children are being detained longer — an average of 75 days in August, compared to 59 days in June and 41 days in fiscal year 2017, according to information the Department of Health and Human Services provided to Congress.

The daily discharge rate plummeted to 1 percent as of Nov. 15, meaning far more children are being placed in shelters than released, said Mark Greenberg, who formerly oversaw Health and Human Services' Administration for Children and Families, the agency in charge of immigrant children.

“It is shocking and disturbing,” said Bob Carey, who previously headed the agency’s Office and Refugee Resettlement overseeing such immigrant shelters. “This is a crisis that was created by the decisions regarding their release.”

BORDER CHAOS: Immigrant parents struggle to find separated children

Evelyn J. Stauffer, a spokeswoman for Health and Human Services, blamed the record number of detained children on a “broken immigration system that encourages them to make the hazardous journey.”

“The number of unaccompanied alien children apprehended are a symptom of the larger problem,” she said in a statement.

Advocates largely fault a new government requirement, implemented this summer, that requires all adults in a household seeking to care for an immigrant child to submit their fingerprints for a background check. That information is shared with the Department of Homeland Security and at least 41 so-called sponsors lacking legal status have been arrested, according to testimony Matthew Albence, acting deputy director of Immigration and Customs Enforcement, gave to Congress in September.

Previous administrations didn’t look into people’s immigration status when deciding whether to release children to them.

Government officials have said they must ensure the safety of migrant children. But parents and relatives are increasingly afraid to claim their children, leaving many to languish in government care, according to several nonprofit officials who work with such minors but declined to be identified because they are not authorized to speak on the matter.

“The kids are beginning to show different sets of problems because they are staying longer,” one official said. “It is a significant problem.”

Detained children often suffer from anxiety, depression and post-traumatic stress disorder, according to the American Academy of Pediatrics.

CROSSING ALONE: Children fleeing to U.S. land in shadowy system

This summer’s family separation crisis focused renewed scrutiny on the billion-dollar enterprise of detaining immigrant children. The network of more than 100 federal shelters across the nation operates with little public transparency, which officials maintain is necessary to protect the privacy and safety of vulnerable children. But it also makes it difficult to hold their caretakers accountable.

The public is rarely allowed in to shelters, as Oregon Sen. Jeff Merkley, a Democrat, discovered when he tried to enter a shelter in a converted Walmart in Brownsville this summer, only to be blocked.

Attorneys who represent detained children are often restricted in discussing the cases by federal grants funding their counsel. The minors' court hearings are frequently closed to the public, so this week’s hearing in Houston was a rare peak into a tiny snapshot of their plight.

Brisack, an experienced immigration judge who has overseen children’s cases since 2014, efforted a mini crash course in immigration law — one of the most complicated areas of jurisprudence.

“The first part is whether or not you are removable,” he told the boys. The second part: “If there is anything to prevent you from being deported.”

Brisack counseled the children to avail themselves of opportunities in the shelters, where lawyers with Catholic Charities of the Archdiocese of Galveston-Houston have a government contract to provide basic representation. Once children are released, they must fund their own counsel in court and most are unable to do so.

“I suggest you take advantage of this as much as you can,” the judge said.

He dealt quickly with some procedural challenges that have become the norm in immigration courts across the nation. Two boys spoke predominantly Mam, an indigenous Guatemalan language, and the Justice Department had no such translators available.

Brisack postponed their cases. Another three wanted to return home, seeking a legal option known as voluntary departure that would not penalize them if they ever returned. But the government objected to providing that to one of the boys, a Honduran teen who crossed into El Paso in June and was classified as an “arriving alien,” meaning he likely asked for asylum at the port of entry.

His claim appeared to have been denied and he has seemingly been detained in a shelter since.

But because of idiosyncrasies in immigration law, the child — who by all accounts sought help the way Trump’s administration has decreed — did not, as a result, qualify for a removal without penalties.

His Catholic Charities attorney declined to comment on his case.

But in the hearing, she asked the government for a legal option known as withdrawing his application for admission, so that the boy could return to Honduras without facing larger legal obstacles if he came back to the United States.

'SOMEWHERE IN TEXAS': Guatemalan father deported without toddler struggles to find him

But that would mean more time in detention as the lawyers sorted that out. The attorney asked to speak to the boy alone.

Brisack attempted banter with the other children.

“Are you all familiar with Thanksgiving?”

Silence.

“It is one day a year where people are supposed to take some time and just be thankful for things.”

Silence.

“It’s a big enough holiday here that people don’t have to work,” he said. “A lot of people celebrate it by eating turkey.”

The court translator struggled to find the correct word for the bird.

“It’s also a big day for American football,” the judge continued. “But you all play real football, so you don’t care about that.”

Finally, laughter.

DEPORTED ALONE: Houston father trying to adjust to life in foreign land of his birth

The attorney returned with the Honduran boy. He wanted to go home.

“I could give you some more time,” Brisack said. “But it would mean you would be in the shelter longer.”

No, the boy said.

If he returns after receiving a formal order of deportation, he could face a felony charge for re-entry and it would be much more challenging to come back legally or qualify for asylum — already a difficult endeavor for many Central Americans. The Trump administration has drastically limited how victims of domestic and gang violence qualify for asylum —a predominant source of persecution for those from these countries.

Some of the boys needed a bathroom break, forcing adolescent giggles.

Then it was on to the day’s final matter. A 14-year-old boy from El Salvador sought to return home, though his parents in Houston and grandparents in El Salvador wanted him to stay in the United States.

A child advocate said the boy’s grandparents had begged her to impress on the court the importance that he remain. Gang violence has made El Salvador one of the most dangerous in the world and teenage boys are often forced to join the groups.

The boy was resolute.

He said his grandparents had raised him since he was 1. He barely knew his parents and little brother in Houston. He has been detained for weeks.

“I made a mistake in coming here,” the child said.

CURBING ASYLUM: Trump administration tightens how people can qualify for protection

The judge asked how often he was able to contact his family: Two 10-minute telephone calls with his grandparents every week and one in-person visit with his parents.

“The law basically says a child is under the control of parent, so I have to be respectful of what the parents are saying,” the judge said. “I know you’re not pleased with that, I can tell.”

He gave the teenager until January before he would order him deported. In that time, it was up to the boy’s lawyer and family to convince him that he should remain in the shelter and pursue an uncertain future here.

The boy’s eyes welled up with tears.

Back to the shelter, for Thanksgiving and Christmas.

This story was updated to include numbers of children crossing alone since 2014, the height of the Central American child migrant crisis, and the even greater number of detained minors, as of Nov. 16, reported by the San Francisco Chronicle.

Lomi Kriel writes about immigration for the Houston Chronicle. Follow her on Twitter at @LomiKriel and Facebook at @ReporterLomi. Send her tips at lomi.kriel@chron.com