Any person detained pursuant to this subchapter is entitled to the writ of habeas corpus, upon proper petition by the person or by a friend to any justice generally empowered to issue the writ of habeas corpus in the county in which the person is detained. [RR 2019, c. 2, Pt. B, §96(COR).]
34-B M.R.S. § 3804