When the petition was filed, there were almost 850 illegal immigrants detained in the correctional homes, the court noted.