851. Any person who is confined or otherwise restrained of his liberty, except under an order in civil matters granted by a court or a judge having jurisdiction, or for some criminal or supposed criminal matter, or any other person on his behalf, may apply to a judge of the Superior Court to obtain a writ of habeas corpus ordering the person under whose custody he is detained to bring him forthwith before a judge of the court and to show the cause of his detention, so that it may be decided whether such detention is justified.
The demand is made by motion supported by an affidavit affirming the truth of the facts on which it is based.
1965 (1st sess.), c. 80, a. 851.