Maddie, the 7-year-old Guatemalan girl who spent a record 250 days at the Berks County immigrant detention center, left the facility with her father on Tuesday after a key legal ruling, the family’s lawyer confirmed.

The two were on their way to reunite with Maddie’s mother in New Jersey on Tuesday night. It will be the first time the father, identified as “Mr. H.” in court, will meet his newborn son.

"Daddy, why are you crying?” the child asked as her father wept after the release.

They walked free a day after a federal judge in Washington, D.C., ruled that amid the pandemic, the same standards that apply to migrant children should apply to their parents — including prompt release from custody whenever possible.

Maddie had spent more time inside than any child currently held in the country’s three family detention centers; the two others are in Texas. A few months ago, federal immigration authorities had offered to release Maddie to her mother. But they would not free her father, which the family’s lawyers said made the overture merely a different form of family separation, one sure to inflict more harm on a suffering child.

On Tuesday evening, Maddie was enjoying a pineapple pizza at the office of one of her lawyers, Bridget Cambria, executive director of ALDEA – The People’s Justice Center in Reading. While at Berks, the girl had dreamed of devouring a hot pineapple pizza.

“They should have been released long before,” Cambria said. “They shouldn’t have to experience a pandemic to get free from detention.”

Cambria had worked on the case with other lawyers including Amy Maldonado of East Lansing, Mich., and the Rapid Defense Network in New York.

U.S. Immigration and Customs Enforcement officials declined to comment Tuesday night.

For Maddie and her father, the release marked the end of a long march through courtrooms and detention facilities as they fought to pursue asylum, a legal means of staying in the United States. Asylum can be awarded to people who could be harmed if sent back to their homelands.

The father and daughter were detained last spring after entering the United States near Tecate, Calif., where they approached a Border Patrol officer and asked for asylum.

Apart from the bitter legal wrangling, ICE could have long ago released both father and daughter to the mother in New Jersey. The mother is in the process of applying for asylum.

Backing for Maddie’s cause came from Pennsylvania Democratic Sen. Bob Casey, who said he had never known a child of that age to be a threat to national security. Republican Sen. Pat Toomey said his office, as well, was trying to work out a solution. Support also came from a galaxy far, far away: Star Wars’ Mark Hamill called Maddie’s detention “outrageous and tragic” on Twitter.