The Illinois Petition for Writ of Habeas Corpus -- Persons In Federal Custody is a legal document that is used to challenge the legality of a person’s detention in federal custody in the state of Illinois. This document is used to request a review of the prisoner’s situation and to allow the court to determine if the prisoner’s detention is legal. This document must be filled out and filed with the court in order for the court to consider the prisoner’s case. There are two types of Illinois Petition for Writ of Habeas Corpus -- Persons In Federal Custody: a petition for release or a petition for a writ of habeas corpus ad prosequendum. The petition for release is used when the petitioner is asking the court to release the prisoner from their current detainment. The petition for a writ of habeas corpus ad prosequendum is used when the petitioner is asking the court to order a review of the prisoner’s situation in order to determine the legality of their confinement.