Maryland Statutes
Part I - State Residential Centers
Section 7-506 - Habeas Corpus

Any individual who has been admitted to a State residential center or any person on behalf of the individual may apply at any time to a court of competent jurisdiction for a writ of habeas corpus to determine the cause and the legality of the detention.