A 7-year-old Guatemalan child who has spent a record 210 days at the Berks County immigrant detention center cannot leave accompanied by her father, after a federal judge ruled Wednesday that the family “must show more than noble goals and an empathetic case” to win their joint release.

U.S. District Judge Joshua D. Wolson wrote that while he sympathized with the girl, known as Maddie, and her father, called Mr. H in court, they find themselves in a difficult position that is “largely of Mr. H’s making.” The father and Maddie were detained last spring after illegally entering the United States near Tecate, Calif.

The girl is free to go to her mother in New Jersey at any time, the court noted. But the petitioners did not show that either of them has a right to demand that the father be released along with his child.

The judge called Maddie “an unfortunate victim of circumstance.” But to prevail the family must show that they were likely to ultimately win their legal claim on the merits, and they failed to do that, the judge wrote.

She has spent more time confined than any child currently held in any of the country’s three family detention centers.

The decision comes amid a broad public debate over the nation’s treatment of migrant children — and as advocates press anew in the political arena and in court to try to close the Pennsylvania detention center.

Maddie and her father had asked the court to issue a preliminary injunction to release both of them immediately, pending the outcome of their removal proceedings — or at least to order the government to conduct a hearing to determine whether they should be released.

But in doing so, father and child “asked the court to wade into uncharted territory and to declare for them Constitutional rights that no other Court has recognized,” the judge wrote. “The court declines to do so."

Efforts to contact attorneys for the family and for the government Wednesday night were unsuccessful.

Judge Wolson wrote flatly: “Mr. H and [Maddie] each claims a right to release with the other so that they can be together as a family. No such right exists, however.”

Apart from the bitter legal wrangling, U.S. Customs and Immigration Enforcement could if it wished, on its own authority, release both father and daughter to the mother in New Jersey.

The court cited its own concerns, however, that “this particular family might flee, given the concerted effort they have made to come to this country,” and given what looked like coordination for Maddie and her father to enter the country while the mother was here on a visa. She subsequently gave birth to a son, a U.S. citizen.

“All of this indicates that the family is committed to staying here, regardless of the legality of doing so,” the judge wrote.

Though the mother is at risk of deportation, she has not been placed in removal proceedings. The girl’s father had sought asylum for both of them after entering the United States illegally, saying they had been threatened by violence in Guatemala, and also in Mexico, where federal authorities had said the two had to wait before their asylum claim could be heard.

Federal immigration authorities had offered to immediately release Maddie to her mother in New Jersey. But not freeing her father, the family’s lawyers argued, made the overture merely a different form of family separation, one they said would inflict more harm on a suffering child.

The hearing featured testimony from a mental-health authority who said Maddie has become deeply depressed — and from the attending mental-health provider at Berks who said the girl was fine. Where the plaintiff’s witness saw a child so distressed that she’s become disheveled, the government’s authority saw a girl whose hair may have been mussed by the hood of her unicorn costume.

The court found testimony of the child’s dire mental-health condition not credible — and noted that no one on the family’s side took immediate steps to address the harm that the girl was supposedly experiencing. However, the judge also found the Berks mental-health witness not credible, saying he had only limited interaction with the girl.

The girl’s lawyers said that never in hundreds of cases has a child been freed from Berks without the accompanying parent. They characterized the offer to free Maddie alone as retaliation for the family’s having filed a federal legal claim along with their immigration case.

But no evidence pointed to retaliation by the government, the judge ruled. Evidence that other families were treated differently showed only that government immigration agencies make different rulings based on different circumstances, the court said.

What’s formally called the Berks County Residential Center is a 96-bed lockup about 75 miles northwest of Philadelphia in Leesport, operated by the county through a contract with ICE. Critics have assailed Berks as a “baby jail” that in October held enough children to fill a day-care center.