1. Any person convicted of a crime and under sentence of death or imprisonment who claims that the conviction was obtained, or that the sentence was imposed, in violation of the Constitution of the United States or the Constitution or laws of this State, or who claims that the time the person has served pursuant to the judgment of conviction has been improperly computed, may, without paying a filing fee, file a postconviction petition for a writ of habeas corpus to obtain relief from the conviction or sentence or to challenge the computation of time that the person has served.
2. Such a petition:
(a) Is not a substitute for and does not affect any remedies which are incident to the proceedings in the trial court or the remedy of direct review of the sentence or conviction.
(b) Comprehends and takes the place of all other common-law, statutory or other remedies which have been available for challenging the validity of the conviction or sentence, and must be used exclusively in place of them.
(c) Is the only remedy available to an incarcerated person to challenge the computation of time that the person has served pursuant to a judgment of conviction.
3. For the purposes of this section, a motion to withdraw a plea of guilty, guilty but mentally ill or nolo contendere pursuant to NRS 176.165 that is made after sentence is imposed or imposition of sentence is suspended is a remedy which is incident to the proceedings in the trial court if:
(a) The person has not filed a prior motion to withdraw the plea and has not filed a prior postconviction petition for a writ of habeas corpus;
(b) The motion is filed within 1 year after the date on which the person was convicted, unless the person pleads specific facts demonstrating that some impediment external to the defense precluded bringing the motion earlier;
(c) At the time the person files the motion to withdraw the plea, the person is not incarcerated for the charge for which the person entered the plea; and
(d) The motion is not barred by the doctrine of laches. A motion filed more than 5 years after the date on which the person was convicted creates a rebuttable presumption of prejudice to the State on the basis of laches.
4. The court shall not appoint counsel to represent a person for the purpose of subsection 3.
(Added to NRS by 1991, 75; A 2017, 370)