AUSTIN, Texas (AP) — A mother and her two young children from Honduras who had filed what was believed to be the first lawsuit involving children challenging the Trump administration's policy on immigrant arrests at courthouses have been released from detention, civil rights groups and attorneys for the family said Thursday. The lawsuit filed on behalf of the mother identified as "Ms. Z," her 6-year-old son and her 9-year-old daughter, said they were arrested outside the courtroom after an immigration court hearing in Los Angeles. They had been held for weeks in theDilley Immigration Processing Center in Texas. Their identities have not been released because of concerns for their safety. The lawsuit said that the family entered the U.S. legally using a Biden-era appointment app and that their arrest violated their Fourth Amendment right to be free from unreasonable searches and seizure and their Fifth Amendment right to due process. The family's lawyers said the boy had also recently undergone chemotherapy treatment for leukemia and his mother feared his health was declining while in detention. The family was released late Wednesday while their lawsuit was still pending, and they went to a shelter in South Texas before they plan to return to their lives in the Los Angeles area, said Columbia Law School professor Elora Mukherjee, one of the lawyers representing the family. "They will go back to their lives, to church, and school, and the family will continue to pursue their asylum case. And hopefully the little boy will get the medical attention he needs," Mukherjee said. "They never should have been arrested and detained in the first place. We are grateful they have been released." Department of Homeland Security officials did not immediately respond to an email request for comment. Last week, the agencyposted on social mediathat the boy "has been seen regularly by medical personnel since arriving at the Dilley facility." Starting in May, the country has seenlarge-scale arrestsin which asylum-seekers appearing at routine hearings have been arrested outside courtrooms as part of the White House'smass deportationeffort. In many cases, a judge will grant a government lawyer's request to dismiss deportation proceedings and then U.S. Immigration and Customs Enforcement officers will arrest the person and place them on "expedited removal," a fast track to deportation. Lawyers for the "Z" family said their lawsuit was the first one filed on behalf of children to challenge the ICE courthouse arrest policy. There have been other similar lawsuits, including in New York, where afederal judge ruledlast month that federalimmigrationauthorities can't make civil arrests at the state's courthouses or arrest anyone going there for a proceeding. "The Z family's release demonstrates the power we have when we fight back against harmful, un-American policies," said Kate Gibson Kumar, staff attorney for the Beyond Borders Program of the Texas Civil Rights Project. The family's lawyers have said that during their hearing before a judge, the mother said they wished to continue their cases for asylum. Homeland Security moved to dismiss their cases, and the judge immediately granted that motion. When they stepped out of the courtroom, they found men in civilian clothing believed to be ICE agents who arrested the family, Mukherjee said. They spent about 11 hours at an immigrant processing center in Los Angeles and were each only given an apple, a small packet of cookies, a juice box and water. At one point, an officer near the boy lifted his shirt, revealing his gun. The boy urinated on himself and was left in wet clothing until the next morning, Mukherjee said.