A judge of the circuit court for a county, of the Court of Special Appeals, or of the Court of Appeals has the power to grant the writ of habeas corpus and exercise jurisdiction in all matters pertaining to habeas corpus.
(a) 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. […]
(a) If it appears to the judge from the petition for the writ or otherwise, that a petitioner, confined as a result of sentence for a criminal offense or judgment in a juvenile proceeding has previously been given a hearing on a prior petition for release from confinement under the same commitment, it is discretionary with […]
(a) On return of a writ of habeas corpus and production of a person and cause of his detention before a judge, the judge shall immediately inquire into the legality and propriety of the confinement or detention. (b) If it appears to the judge that the person is detained without legal warrant or authority, he shall release […]
(a) Except as provided in subsection (b) of this section, a person who has been released on habeas corpus may not be imprisoned or committed in connection with the same offense. (b) A person who has been released on habeas corpus may be imprisoned or committed in connection with the same offense: (1) By order of the court […]
(a) If a person is released or discharged by a judge under the writ of habeas corpus on the ground that the law under which the person was convicted is unconstitutional, in whole or in part, the judge shall file a memorandum within five days after the release or discharge and transmit it with original papers […]
(a) If a judge refuses to issue a writ of habeas corpus sought for the purpose of determining the right to bail, or if a judge sets bail claimed to be excessive prior to trial or after conviction, but prior to final judgment, a petitioner may apply to the Court of Special Appeals for leave to […]