The Illinois Petition for Writ of Habeas Corpus ad Testificandum and Order is a legal document issued by a court in the state of Illinois. It is typically issued when an individual is being held in custody and is requesting to be released. The petition is typically used when the individual in custody believes they have been wrongly detained, or that their rights have been violated. The Petition for Writ of Habeas Corpus ad Testificandum and Order is composed of two parts: the Petition and the Order. The Petition is filed by the individual in custody or their representative and requests the court to issue a Writ of Habeas Corpus. This writ is a legal order to the detaining authority, ordering them to appear before a court and provide proof that the individual is being lawfully detained. The Order is issued by the court, directing the detaining authority to bring the individual in custody before the court to present the proof of their lawful detention. The two main types of Illinois Petition for Writ of Habeas Corpus ad Testificandum and Order are the Original Writ and the Return Writ. The Original Writ is the initial request that is submitted to the court for issuance of the writ. The Return Writ is issued after the detaining authority has appeared before the court and provided the proof of their lawful detention. This type of writ can be used to challenge the legality of the detention and argue for the individual's release.