The federal government has released a 10-year-old girl with cerebral palsy to her family, according to the American Civil Liberties Union.Rosa Maria Hernandez and her parents had been living in Laredo, Texas — in the U.S. without permission — and the Border Patrol had taken her into custody as she was transported through a checkpoint on her way to a Corpus Christie hospital for emergency surgery. Federal authorities held her at a facility for children, rather than letting her return to her parents. She has been in deportation proceedings.The ACLU filed a lawsuit seeking her release to her parents.NPR's John Burnett has reported that Rosa Maria was picked up by the Border Patrol while riding in an ambulance with her cousin, who is a U.S. citizen. "[Doctors] in Laredo sent Hernandez to Driscoll Children's Hospital in Corpus Christi for emergency gallbladder surgery. Because that city is beyond a federal immigration checkpoint, her parents asked an adult cousin — who is a U.S. citizen — to accompany her on the medical trip. "At the checkpoint outside the South Texas town of Freer, Border Patrol agents learned that the sick girl was not in the country legally. They took her into custody, followed her to the hospital, and waited outside her recovery room. ... "Gabriel Acosta, assistant chief patrol agent in Laredo, says his agents followed a 10-year-old federal law for handling a UAC — an unaccompanied alien child. " 'By law we have to do exactly what we did,' he said in an interview in sector headquarters."A spokesperson for the Department of Health and Human Services, which runs the facility where Rosa Maria was in custody, said the agency could not comment on specific cases because of privacy concerns. Copyright 2017 NPR. To see more, visit http://www.npr.org/.