A mother from Honduras and her 3-year-old son are free after nearly two years in an immigrant detention center in Berks County, Pennsylvania.

Wendy Osorio Martinez and her son, Diego Rivera Osorio, are one of four families who were held at the Berks Family Residential Center for nearly two years. Long detentions such as theirs have prompted protests from activists, a hunger strike by detainees, as well as letters and tweets from U.S. Sen. Bob Casey seeking their release.

A York County immigration judge ordered their immediate release after a hearing on Monday.

A video taken a few hours after the decision shows 3-year-old Diego sprinting down the sidewalk in front of the detention center, located in a pocket of rolling green hills in Bern Township, Berks County. On a nearby walkway, current detainees whom he calls "grandmother" and "papa" are waiting to give him a hug goodbye.

"He learned how to talk and walk there. That's where he learned everything," said Osorio Martinez as she and Diego sat down for a late celebratory dinner with their attorneys at a Mexican restaurant in nearby Wyomissing.

It was their first meal outside a detention center since they first arrived in the US in October 2015.

cohen wendy-osorio-matrinez-3Wendy Osorio Martinez sits with her son, Diego Rivera Osorio, 3, at a celebratory dinner with their immigration advocates and attorneys. (Emily Cohen for NewsWorks)

A long journey

In 2015, Osorio Martinez and her son fled their native Honduras after a family involved in the drug trade there threatened them.

Shortly after crossing the Mexican border into the U.S., they were apprehended by immigration officials, who determined they did not qualify for asylum.

Attorneys fought their case, but they had been held in the county-run detention center until a judge decided to release them on Monday.

"I was shocked, because I didn't expect a decision today," said Bridget Cambria, one of their Reading-based immigration attorneys.

Two recent federal court opinions made that decision possible.

The first reaffirmed an earlier ruling that children who arrive in the U.S. with a parent are covered under Flores v. Reno, a 1997 court settlement governing the detention of all immigrant children in federal custody.

Then, in July, a federal appeals court ordered that immigrant children in detention covered by that settlement have the right to hearings before an immigration judge to determine whether they should continue to be confined.

Attorneys for the Department of Homeland Security argued that right is void for children, like Diego,  apprehended near the U.S.-Mexico border. Since most children apprehended in the U.S. are put through a process called "expedited removal," which streamlines deportations and hearings, they said the boy was not covered by the Flores settlement.

"So what the court has done here in its most recent ruling is to say to the government, 'You're wrong,'" said Peter Schey, attorney with the Center for Human Rights in Los Angeles and class counsel representing children in the Flores settlement.

But during a hearing before a local immigration judge Monday afternoon, Osorio Martinez and her son's lawyers argued they were eligible for release and that these rulings gave the judge the power to make the call about whether Diego should continue to be detained.

Judge Water A. Durling agreed.

Flores only provides these due-process rights to children — not their parents, but the Judge ordered the simultaneous release of Osorio Martinez "because she is his only caretaker," said Cambria.

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

Osorio Martinez was among a group of nearly 30 women who challenged their asylum determinations in 2015 and were held in the Berks Center for a year and half as the case wound its way through the courts. They ultimately lost, and many of the other women and children involved were deported.

Special visa for kids

While that case was being argued and appealed, Diego, along with four other children at the center, received a visa called Special Immigrant Juvenile status that puts them on the path to a green card. The status does not confer any immigration benefit to parents of SIJS holders, so his mother's case remains closed.

Osorio Martinez now wears an ankle monitor, which will track her as they move to Houston to reunite with family. Diego dreams of going to the beach, which he has seen on television.

But as they prepare to leave Pennsylvania, they will be taking memories of the three other children and their mothers they left behind in limbo after a bittersweet goodbye.

"The reality is a lot of feelings, a lot of mixed feelings, and we went through so much together," said Osorio Martinez. "They are our family."