The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully.A writ of habeas corpus enables jailed defendants to ask a judge to let them go free or to order that inappropriate conditions of their imprisonment be stopped. 78B-6-601. Penalty for wrongful refusal to allow writ of habeas corpus. The privilege of the writ of habeas corpus shall not be suspended, unless, in case of rebellion or invasion, the public safety requires it. Archuleta, Salt Lake City, for plaintiff and appellant. Salt Lake City, UT 84114. Patterson's appellate attorney was clear: the state case was over, and the next step was to seek a writ of habeas corpus in federal court. The writ of habeas corpus can be employed procedurally in federal district courts to challenge the constitutionality of a state court conviction. Billy Hulsey, Salt Lake City, for respondent.