Immigrant children who cross the border without their parents have the right to a court hearing to challenge any decision to detain them instead of turning them over to family in the U.S., a federal appeals court said Wednesday.

The 9th U.S. Circuit Court of Appeals said two laws passed by Congress did not end the right to a bond hearing for unaccompanied immigrant children who are detained by federal authorities.

Tens of thousands of unaccompanied children fleeing gang and drug violence in Guatemala, Honduras and El Salvador have entered the U.S. in recent years.

Federal officials place the vast majority of them with family in the U.S., who care for the minors while they attend school and while their cases go through the immigration court system.

But the Department of Human Services has the authority to hold children in secure facilities if they pose a danger to themselves or others or have committed a crime. Some have spent months in detention.

Immigration advocates estimate the size of the group in secure custody at several hundred children and say bond hearings allow them to understand why they are being held and challenge their detention.

"If you don't give kids transparency and a clear finite date when their detention will end you see all kinds of psychological effects," said Holly Cooper, co-director of the Immigration Law Clinic at the University of California, Davis.

Cooper represented plaintiffs in the legal fight over the bond hearings. The 9th Circuit ruling cited a declaration from one teenager who was held for 16 months, mostly at a juvenile detention center in Northern California. The teen, referred to only by his first name, Hector, said federal officials provided no explanation for his continued detention, and he received no hearing before an immigration judge. He was eventually released to his mother.

The Obama administration argued that two laws — one approved in 2002 and the other in 2008 — did away with the bond hearing requirement in a 1997 court settlement by giving the human services department all authority over custody and placement decisions for unaccompanied children.

The Department of Justice said in a 2016 court filing that immigration judges "are not experts in child-welfare issues and possess significantly less expertise in determining what is in the best interest of the child" than human services officials.

The content contained on the web site has been prepared by Breaking Legal News. as a service to the internet community and is not intended to constitute legal advice ora substitute for consultation with a licensed legal professional in a particular case or circumstance.