SAN FRANCISCO (AP) – A federal appeals court says 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.

The 9th U.S. Circuit Court of Appeals ruled Wednesday that two laws passed by Congress didn’t end the right to a bond hearing for unaccompanied immigrant children detained by federal authorities.

READ MORE: North Texas Mom Hospitalized 93 Days With COVID-19 Delivers Healthy Baby Girl

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.

READ MORE: DFW Area Has 5 Boys Basketball Players Named McDonald’s All Americans

Federal officials place the vast majority of those children with family in the U.S. But some are held for months.

Immigration advocates say that without a bond hearing, the children have no way of challenging their detention.

MORE NEWS: Dallas ISD To Launch Full-Time Virtual School This Coming Fall

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)