The Oklahoma Writ of Habeas Corpus(2254 -State Custody) is a legal document issued by a court to a state correctional institution. It is a form of relief that allows a prisoner to challenge the legality of their detention. It is used to determine if the state has violated the prisoner's constitutional rights. Furthermore, it can also be used to determine if the prisoner is being held unlawfully or if the state has failed to provide the prisoner with adequate due process. The writ is a writ of habeas corpus, which is a Latin phrase that translates to "you have the body" and essentially requires the state to produce the prisoner to the court for a hearing. There are two types of Oklahoma Writ of Habeas Corpus (2254 -State Custody): a regular writ and a special writ. The regular writ is a document issued by a judge or court to the prison ordering that the prisoner be brought before the court in order for the court to determine whether the prisoner is being held unlawfully. The special writ is issued by the Oklahoma Court of Criminal Appeals, which is the highest criminal court in the state. The special writ is used when the prisoner is challenging the validity of their conviction or sentence.