Rosa Maria Hernandez, shown here in an undated family photo, has been released to her family, though her future remains uncertain. Rosa Maria was detained by immigration authorities after gallbladder surgery last month and her detention was the subject of a lawsuit and national attention.

A 10-year-old girl with cerebral palsy who was detained by immigration authorities after surgery has been released to her family, but her future in the country remains uncertain.

Federal immigration authorities released Rosa Maria Hernandez on Friday after more than a week in detention in Texas. A lawyer for the girl’s family confirmed to the Corpus Christi Caller-Times she was released to relatives from a San Antonio facility for undocumented minors.

While he applauded the child’s release, U.S. Rep. Joaquin Castro noted that her future is uncertain because federal authorities have not determined whether she’ll be able to remain in this country.

“While this is welcome news, Rosa Maria’s future remains uncertain. The Trump administration has not made clear whether they will proceed with deportation proceedings against her. I continue to call for Rosa Maria’s case to be administratively closed,” said Castro, a Democrat.

“The United States should not be a place where children seeking life-sustaining medical care are at risk of apprehension. I urge the Department of Homeland Security to abide by its claims that dangerous criminals are the agency’s priority and reinforce its sensitive locations policies to employees.”

U.S. Border Patrol agents at a checkpoint had stopped an ambulance taking Rosa Maria to emergency gallbladder surgery early Oct. 24. Since then, relatives and their supporters have rallied on the child’s behalf. They said she had never been separated from her family.

The girl left detention a day after a federal judge in San Antonio canceled a release hearing scheduled after the American Civil Liberties Union sued the federal government and urged officials to let her go. Upon her release, the ACLU’s Texas legal director tweeted: “We will continue to challenge the government to stop this kind of heartless and unlawful conduct.”

The case generated international coverage over what the family and its lawyers – along with politicians and activists – called a particularly harsh application of U.S. immigration policy.

When Rosa Maria was an infant, her parents brought her to the United States from Mexico, in part to obtain treatment for her cerebral palsy. None of the three is a U.S. citizen.

The child’s parents were not with her when U.S. Border Patrol agents stopped her ambulance at a checkpoint between her home in Laredo and a children’s hospital in Corpus Christi. A cousin who is a U.S. citizen accompanied the girl in the ambulance.

Agents followed the vehicle on the two-hour drive to the hospital, remained outside the operating and recovery rooms, then transported the child to a shelter run by the federal Office of Refugee Resettlement. That facility is in San Antonio, another two-hour drive northwest of Corpus Christi.

During Rosa Maria’s detention, immigration officials indicated that they were holding her for processing and potential deportation.

Objections to the detention did not sway a federal judge’s decision to cancel a hearing scheduled for Nov. 7 that may have led to the girl’s release. The judge’s rhetoric echoed immigration and border security agencies’ assertions that they prioritized the 10-year-old’s health and safety.

In his three-page ruling on Thursday U.S. District Judge Fred Biery questioned why immigration authorities had not also apprehended Rosa Maria’s mother. He added that the mother and daughter could be reunited elsewhere.

Paperwork filed in the ACLU lawsuit says Rosa Maria was agitated over the separation from her family as she recovers from surgery. Relatives say her cognitive development resembles that of a 6-year-old.

Cheryl Devall can be reached at cdevall@revealnews.org. Follow her on Twitter: @0212crd.

Cheryl Devall is a senior radio editor at Reveal. She is a native Californian with Louisiana roots from which storytelling runs deep. As an editor and correspondent, she's worked for the Daily World in Opelousas, Louisiana (the birthplace of zydeco music); Southern California Public Radio; National Public Radio; “Marketplace;” The Mercury News in San Jose, California; and the Chicago Tribune. Devall has shared in three Alfred I. duPont-Columbia University Awards for coverage of AIDS and black America, the 1992 Los Angeles riots and North Carolina 40 years after the federal war on poverty. She's based in Reveal's Emeryville, California, office.