145. General scope of the writ.

The writ is available as a remedy in all cases of wrongful deprivation of personal liberty1. The illegal detention of a subject, that is a detention or imprisonment which is incapable of legal justification, is the basis of jurisdiction in habeas corpus2.

Where the detention of an individual is under process for criminal or supposed criminal causes3, the jurisdiction of the court and the regularity of the commitment may be inquired into4.

Where the restraint is imposed on civil grounds under claim of authority, the legal validity of that claim may be investigated and determined5, and where, as frequently occurs in