delivered the Opinion of the Court.
¶1 Robert John Boucher (Boucher) appeals the denial of his appeal to the Fourth Judicial District Court. Boucher entered a plea of guilty to driving under the influence of alcohol in Mineral County Justice Court. After judgment, Boucher moved to withdraw the plea, and the Justice Court denied the motion. Boucher appealed to the District Court, which both found that Boucher’s plea had been entered voluntarily and dismissed the appeal due to lack of jurisdiction. This Court exercises subject matter jurisdiction by deeming Boucher’s filing in the District Court as a petition for postconviction relief. On the basis that the record does not support a finding that Boucher entered his plea voluntarily, knowingly and intelligently, we reverse and remand.
FACTUAL AND PROCEDURAL BACKGROUND
¶2 Boucher received a citation for driving under the influence of alcohol (DUI), in violation of § 61-8-401, MCA, on November 11,1999. He appeared in Mineral County Justice Court the following day and entered a plea of not guilty. At the time of his initial appearance, Justice of the Peace Wanda James advised Boucher of his constitutional rights, and Boucher signed a form that stated, in pertinent part:
I understand that if you [sic] willingly and knowingly enter a guilty plea in this case, you [sic] are giving up your [sic] right to appeal this case to the district court.
¶3 On March 31,2000, Boucher, his attorney and the county attorney appeared in Justice James’ court and discussed the possibility of amending the charge to DUI per se and some of the ramifications of a guilty plea. The State amended the original complaint and Boucher entered a plea of guilty to a DUI per se violation, under § 61-8-406, MCA, by telephone conversation with Justice James on April 3, 2000. Justice James testified she did not recall whether she had reiterated or discussed waiver of Boucher’s right to appeal over the telephone at the time he changed his plea. The court issued a written judgment memorializing the sentence, which was mailed to Boucher. The *517judgment included the following statement:
The Defendant may appeal this Judgment to the district court by filing written notice of the appeal within ten days.
¶4 Boucher then learned that as a result of his guilty plea his driving privileges would be revoked in the State of Washington where he worked on a temporary construction job. On April 7, 2000, Boucher filed a motion in Justice Court to withdraw his plea, stating the following basis:
The plea was entered with the [Defendant’s] understanding that he could continue driving. Subsequent events of no fault of any of the parties have proven this to be impossible.
The Justice Court denied Boucher’s motion.
¶5 On April 12, 2000, Boucher filed a pro se, hand-written notice to the District Court of an appeal “to [his] guilty plea.” The State immediately moved to dismiss the appeal. Boucher, with the assistance of counsel, filed a response to the motion, alleging that his plea was not knowing or voluntary because he had not been apprised by the Justice of the Peace at the time he entered the plea on April 3, 2000, that he was waiving his right to appeal.
¶6 At the hearing held on September 14, 2000, the District Court reviewed the Justice Court’s denial of Boucher’s motion to withdraw his plea. The court found Boucher had been informed at the time of his initial appearance on November 12,1999, that a guilty plea waived the right to a trial and appeal. The court also found that Justice James admonished Boucher on several occasions that any collateral consequences of his guilty plea, specifically including the effect on his driving privileges in Washington, were unknown to the court and would have to be determined exclusively by Boucher with the assistance of counsel. The court noted that the Justice of the Peace did not make mention of any right to appeal the judgment when Boucher entered his guilty plea by telephone.
¶7 The District Court concluded that Boucher entered his guilty plea knowingly, voluntarily and intelligently. Further, the court held that the Justice Court’s oral judgment, which contained no mention of any right to appeal, controlled over the subsequent written judgment, which stated that the defendant could appeal within 10 days. On the issue of jurisdiction, the court concluded Boucher was not entitled to appeal to the district court as a matter of law and granted the State’s motion to dismiss.
¶8 Boucher filed a notice of appeal from the District Court’s dismissal of his appeal. On October 20,2000, the District Court stayed Boucher’s sentence pending the outcome of the appeal to this Court.
*518¶9 The threshold issue before this Court is whether the District Court has jurisdiction to review a postconviction denial of a motion to withdraw a guilty plea in Justice Court. The underlying issue is whether the District Court correctly concluded that Boucher entered his guilty plea in Justice Court voluntarily.
STANDARD OF REVIEW
¶10 Whether to dismiss a claim based on lack of subject matter jurisdiction is a question of law. We review a district court’s conclusions of law to determine if they are correct. In re Marriage of Skillen, 1998 MT 43, ¶ 9, 287 Mont. 399, ¶ 9, 956 P.2d 1, ¶ 9. A district court may permit the withdrawal of a guilty plea for good cause. Section 46-16-105(2), MCA. This Court reviews denial of a motion to withdraw a guilty plea for abuse of discretion. State v. Bowley (1997), 282 Mont. 298, 304, 938 P.2d 592, 595.
I
¶11 Did the District Court have jurisdiction to review a postconviction denial of a motion to withdraw a guilty plea in Justice Court?
¶12 The issue of a court’s subject matter jurisdiction may be presented at any time. Balyeat Law, PC v. Pettit, 1998 MT 252, ¶ 15, 291 Mont. 196, ¶ 15, 967 P.2d 398, ¶ 15. A party can never waive or consent to subject matter jurisdiction where there is no basis for the court to exercise jurisdiction. In re Marriage of Skillen, ¶ 10. Pursuant to § 46-17-203(2), MCA, entry of a guilty plea in justice court waives a defendant’s right to a trial de novo in district court. This Court recently held there is no statutory right of appeal from a justice court’s order denying a motion to withdraw a guilty plea. State v. Feight, 2001 MT 205, ¶ 22, 306 Mont. 312, ¶ 22, 33 P.3d 623, ¶ 22; State v. Fox, 2001 MT 209, ¶ 17, 306 Mont. 353, ¶ 17, 34 P.3d 484, ¶ 17.
¶13 The State asserts on appeal that the District Court lacked subject matter jurisdiction over Boucher’s appeal because Montana law does not provide for an appeal to district court after a defendant enters a plea of guilty in a court of limited jurisdiction. Boucher acknowledges that a defendant who enters a guilty plea in justice court waives the right of trial de novo in district court, pursuant to § 46-17-203(2), MCA, but contends his guilty plea is not valid, and challenges the Justice Court’s acceptance of the plea on the grounds that his plea and waiver were not entered voluntarily. Boucher cites State v. Waymire (1987), 226 Mont. 406, 736 P.2d 106, for the proposition that reason, justice and public policy dictate that an appeal of a guilty plea injustice court may be tried anew in district court provided the appeal is properly *519perfected.
¶14 In State v. Waymire, the Court addressed two separate cases where defendants sought to withdraw their guilty pleas. Jeffery Waymire alleged that the justice court entered a plea on his behalf but without his consent. The other defendant, Charles Metcalf, voluntarily entered a guilty plea in justice court but was dissatisfied with his sentence. Although the defendants presented very different legal issues, we held that the remedy for both was trial de novo in district court. Waymire, 226 Mont. at 408-09, 736 P.2d at 108.
¶15 Following the Waymire decision, the Legislature limited the right of appeal from courts of limited jurisdiction by amending § 46-17-311, MCA, in 1991 to read, in pertinent part:
Appeal from justices’, municipal, and city courts. (1) Except ... for cases in which legal issues are preserved for appeal pursuant to 46-12-204, all cases on appeal from a justice’s or city court must be tried anew in the district court... (2) The defendant may appeal to the district court by filing written notice of intention to appeal within 10 days after a judgment is rendered following trial....
Sec. 217, Ch. 800, L. 1991 (words of amendment in italics). Subsequently, we determined § 46-17-311(2), MCA, as amended, procedurally requires adjudication of a matter by trial in a justice or city court as a prerequisite to an appeal in district court for a trial de novo. Feight, ¶ 15. We also held that § 46-17-311, MCA, provides the exclusive statutory remedy for appeals from the courts of limited jurisdiction. Feight, ¶ 15. At present, unless a specific issue has been preserved for appeal prior to final judgment, our laws provide no appeal from a plea of guilty or nolo contendere entered in a court of limited jurisdiction. Feight, ¶ 12. Accordingly, a motion to withdraw a guilty plea may be granted or denied at the discretion of a justice or city court that has original jurisdiction, with no right of direct appeal.
¶16 On appeal to this Court, the State argues that after the Justice of the Peace denied Boucher’s request to withdraw his guilty plea, Boucher’s remedy was to petition the District Court for postconviction relief on the grounds that his conviction in Justice Court was based on an involuntary plea. We agree.
¶17 Section 46-21-101(2), MCA, states that á defendant who has exhausted all appeal remedies provided by law may seek relief from a sentence by filing a petition for postconviction relief with the district court in the county where the court of limited jurisdiction is located. Postconviction relief is available when the sentence violates state law, the Montana Constitution or the Constitution of the United States. *520Section 46-21-101(1), MCA. A postconviction hearing is not another form of appeal from a criminal case, but a separate civil proceeding aimed at vacating, setting aside or correcting a sentence. Coleman v. State (1981), 194 Mont. 428, 433, 633 P.2d 624, 627. The right to postconviction relief is available to a defendant whose sentence was imposed by a justice, municipal or city court. State v. Christensen (1994), 265 Mont. 374, 377, 877 P.2d 468, 469.
¶18 Recently, in State v. Liefert, 2002 MT 48, ¶ 8, 309 Mont. 19, ¶ 8, 43 P.3d 329, ¶ 8, the State invited this Court to deem an appeal as a petition for postconviction relief in order to exercise subject matter jurisdiction over the denial of Liefert’s motion to withdraw a plea entered in justice court. We did so, but did not determine whether a petition for post-conviction relief is proper in similarly situated cases. Liefert, ¶ 8. The instant controversy presents such a similarly situated case.
¶19 The District Court correctly determined as a matter of law that Boucher had no right to appeal the Justice Court’s denial of his motion to withdraw his guilty plea. However, given the contrary instructions regarding the appeals process issued by the Justice of the Peace, the fact that justice court is not a court of record, and the nature of Boucher’s constitutional challenge to the validity of his plea, the District Court held an evidentiary hearing to establish a factual basis for ruling on issues raised.
¶20 The absence of an appellate remedy and the constitutional claims asserted establish Boucher’s eligibility to pursue postconviction relief in accordance with § 46-21-101, MCA. In view of this right and consistent with our holdings in Christensen and Liefert, we deem Boucher’s appeal to the District Court as a petition for postconviction relief and the District Court proceedings as the functional equivalent of a postconviction hearing. We now address the District Court’s finding that Boucher’s plea was entered voluntarily.
II
¶21 Did the District Court correctly conclude that Boucher entered his guilty plea in Justice Court knowingly and voluntarily ?
¶22 In light of the importance of the constitutional rights and protections waived by a guilty plea, the plea must be a voluntary, knowing, and intelligent choice among the alternative courses of action open to the defendant. State v. Radi (1991), 250 Mont. 155, 159, 818 P.2d 1203, 1206 (citing North Carolina v. Alford (1970), 400 U.S. 25, 91 S.Ct. 160, 27 L.Ed.2d 162). The defendant must be aware of the rights waived, which include the right to a speedy and public trial by *521jury, the right to effective assistance of counsel, the right to confront and cross-examine witnesses, the right to testify and have witnesses testify, the right not to be compelled to incriminate oneself, the right to have charges proved beyond a reasonable doubt, and the right to appeal a finding of guilty. State v. Yother (1992), 253 Mont. 128, 130, 831 P.2d 1347, 1348.
¶23 Because the voluntary nature of a guilty plea is crucial to the integrity of the judicial process, numerous statutes set forth procedural requirements for a valid plea. See §§ 46-12-204, 46-12-210, 46-12-212 and 46-16-105(1), MCA. If these requirements are not met, the court may not accept the plea, and the case must be either dismissed or tried on its merits. Section 46-12-204 (2), MCA, states:
The court may not accept a plea of guilty or nolo contendere without first determining that the plea is voluntary and not the result of force or threats or of promises apart from the plea agreement. The court shall also inquire as to whether the defendant’s willingness to plead guilty or nolo contendere results from prior discussions between the prosecutor and the defendant or the defendant’s attorney.
¶24 Additional procedural safeguards to insure that a plea entered in a court of limited jurisdiction is voluntary are outlined in § 46-17-203(2), MCA, which states:
A plea of guilty or nolo contendere in a justice’s court, city court, or other court of limited jurisdiction waives the right of trial de novo in district court. A defendant must be informed of the waiver before the plea is accepted, and the justice or judge shall question the defendant to ensure that the plea and waiver are entered voluntarily.
More explicitly, “the court shall determine that the defendant understands ... there will not be a further trial of any kind, so that by pleading guilty or nolo contendere the defendant waives the right to a trial.” Section 46-12-210(1)(e), MCA. A court may permit a defendant to withdraw his guilty plea at any time, before or after judgment, for good cause shown. Section 46-16-105(2), MCA.
¶25 To determine whether good cause existed and whether a court abused its discretion by denying a defendant’s motion to withdraw a guilty plea, we consider three factors: (1) the adequacy of the court’s interrogation at the time the plea was entered regarding the defendant’s understanding of the consequences of the plea; (2) the promptness with which the defendant attempts to withdraw the plea; and (3) whether the plea was the result of a plea bargain in which the guilty plea was given in exchange for dismissal of another charge. *522Bowley, 282 Mont. at 304, 938 P.2d at 595. The fundamental purpose of allowing the withdrawal of a guilty plea is to guard against the conviction of an innocent person. State v. Schaff, 1998 MT 104, ¶ 17, 288 Mont. 421, ¶ 17, 958 P.2d 682, ¶ 17 (citing Bowley, 282 Mont. at 303-04, 938 P.2d at 595). If there is any doubt that a plea was involuntary, the doubt should be resolved in favor of defendant. Schaff, ¶ 17 (quoting State v. McAllister (1934), 96 Mont. 348, 353, 30 P.2d 821, 823).
¶26 Boucher’s challenge is based solely on the adequacy of the Justice Court’s advisement regarding Boucher’s waiver of his appeal rights, as required by § 46-17-203(2), MCA, and § 46-12-210(1)(e), MCA. Boucher maintains that he was confused about his right to appeal and did not realize he was waiving his appeal right at the time he entered his guilty plea. He further contends that the Justice of the Peace neither informed nor questioned him at the time he changed his plea over the telephone to make certain that he understood the consequences of his waiver. Justice James testified at the hearing in District Court that she did not recall discussing Boucher’s waiver at the time he entered his plea on April 3, 2000, and relied upon the statement signed five months earlier on November 12,1999, signifying Boucher understood he would waive his right to appeal for a trial de novo in district court if he pleaded guilty.
¶27 The Justice Court was required to determine that Boucher understood he waived certain constitutional rights, including the right to a trial and appeal, pursuant to § 46-12-210(1), MCA. The court accomplished this at Boucher’s initial appearance by having Boucher acknowledge in writing that he understood the waivers he would make if he pleaded guilty. Months later, the State amended the complaint and Boucher changed his plea to guilty. Section 46-17-203(2), MCA, states: “A defendant must be informed of the waiver before the plea is accepted, and the justice or judge shall question the defendant to ensure that the plea and waiver are entered voluntarily.” This statute gives the clear impression that the justice court is to inform the defendant about the waiver of the right to appeal and ascertain that the defendant understands the waiver at the time a guilty plea is entered and before the court accepts the plea.
¶28 Boucher entered a plea of not guilty at his initial appearance. Accordingly, he waived no constitutional rights on November 12,1999, when he signed the waiver acknowledgment form provided by the court. Boucher’s waiver occurred only after the State amended the charge and when he changed his plea to guilty in April 2000. Prior to accepting the change of plea, the court is required to “question the *523defendant to ensure the plea and waiver are entered voluntarily.” According to the testimony of Justice James, she did not reiterate the information the court provided five months earlier concerning Boucher’s constitutional rights and failed to question Boucher regarding his understanding of the waiver at the time Boucher changed his plea. Consequently, we conclude that the court’s colloquy was inadequate and good cause existed to permit Boucher to withdraw his guilty plea.
¶29 Since any doubt about whether a plea was voluntary should be resolved in favor of the defendant, we hold that the District Court, under these facts, erred by not allowing Boucher to withdraw his guilty plea. Therefore, we reverse Boucher’s guilty plea, and remand this matter to the Justice Court for further proceedings in regard to the charge against Boucher for driving under the influence of alcohol.
CHIEF JUSTICE GRAY, JUSTICES LEAPHART and NELSON concur.