<?xml version='1.0' encoding='utf-8'?>
<section article="gcj" article_name="Courts and Judicial Proceedings" number="3-702" title_number="3" title_name="Courts of General Jurisdiction -- Jurisdiction/special Causes of Action" subtitle_number="7" subtitle_name="Habeas Corpus">
  <level label="a">
    <text>A person committed, detained, confined, or restrained from his lawful liberty within the State for any alleged offense or under any color or pretense or any person in his behalf, may petition for the writ of habeas corpus to the end that the cause of the commitment, detainer, confinement, or restraint may be inquired into.</text>
  </level>
  <level label="b">
    <level label="1">
      <text>Upon receiving the petition, a judge shall grant the writ of habeas corpus immediately, if it appears that the petitioner is entitled to the relief, or shall immediately refer the application to any court in the judicial circuit in which the person confined was convicted, without taking any other action on the application.</text>
    </level>
    <level label="2">
      <text>An application may not be referred to any judge who presided at the trial at which the person was convicted, except with the written consent of the applicant or the person confined.</text>
    </level>
    <level label="3">
      <text>A court to which an application for a writ has been referred shall act immediately on the application and has no power to refer or transfer the application.</text>
    </level>
    <level label="4">
      <text>In exercising discretion, the judge to whom an application for a writ is made shall consider the interests and convenience of all parties concerned, including the State.</text>
    </level>
  </level>
</section>
