Section 25. This chapter shall not affect the power of the supreme judicial court, or the superior court, or a justice thereof, to issue a writ of habeas corpus in its discretion, and thereupon grant bail to a person for whatever cause he has been committed or restrained, or to discharge him as law and justice require. The court shall have no power to issue a writ of habeas corpus, at its discretion for—a person who has been committed by the governor and council, the senate, or the house of representatives in the manner and for the causes mentioned in the constitution, or a person who is imprisoned or restrained of his liberty pursuant to a criminal conviction.
This chapter shall not affect the power of any court or magistrate to issue a writ of habeas corpus, when necessary to bring before it a prisoner for trial in a pending criminal case; or to bring a prisoner to be examined as a witness in a suit or proceeding, civil or criminal, pending before the court, if the personal attendance and examination of the witness is necessary for the attainment of justice.
Structure Massachusetts General Laws
Part III - Courts, Judicial Officers and Proceedings in Civil Cases
Title IV - Certain Writs and Proceedings in Special Cases
Chapter 248 - Habeas Corpus and Personal Liberty
Section 1 - Persons Entitled to Writ; Exceptions
Section 3 - Petition for Writ; Contents; Annexed Papers
Section 4 - Issuance of Writ; Return
Section 6 - Signature of Magistrate or Clerk; Service
Section 7 - Designation of Custodian of Prisoner
Section 8 - Designation of Prisoner
Section 9 - Expense of Transporting Prisoner; Advance Payment
Section 11 - Contents of Return
Section 12 - Production of Prisoner
Section 13 - Illness Preventing Production of Prisoner
Section 14 - Return Before Justice of Court
Section 15 - Causes of Imprisonment; Examination
Section 16 - Notice to Persons Interested in Continuing Imprisonment
Section 17 - Notice; Prisoners Held for Crimes
Section 18 - Custody of Prisoner Pending Examination
Section 20 - Prisoners Committed in Civil Actions for Want of Bail; Bail
Section 21 - Prisoners Committed on Criminal Charges; Bail
Section 22 - Remanding Prisoner
Section 23 - Discharging Prisoner
Section 24 - Imprisonment After Discharge
Section 26 - Refusal of Officer to Deliver Copy of Warrant; Penalty
Section 27 - Refusal to Obey Writ; Attachment
Section 28 - Attachment; Executing Officers
Section 29 - Refusal to Obey Writ; Precept Commanding Production of Prisoner
Section 30 - Refusal to Obey Writ; Penalty
Section 31 - Resistance or Disobedience of Writ; Attachment
Section 32 - Removing or Concealing Prisoner; Penalty
Section 33 - Recovery of Penalties; Effect on Actions by Aggrieved Parties
Section 34 - Persons in Custody of United States Marshal
Section 35 - Personal Liberty; How Secured
Section 36 - Petition to Obtain Personal Liberty
Section 37 - Notice to Custodians, Etc.
Section 38 - Examination of Witnesses
Section 39 - Conducting Examinations; Assistance From District Attorneys