Every person whose liberty is restrained, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of the restraint, and shall be delivered from the restraint if the restraint is illegal.
IC 34-25.5-1-1
Pre-1998 Recodification Citation: 34-1-57-1.