
536 N.W.2d 358 (1995)
STATE of North Dakota, Plaintiff and Appellant,
v.
Michael J. KEYES, Defendant and Appellee.
Crim. No. 950048.
Supreme Court of North Dakota.
August 29, 1995.
Robert A. Freed (argued), Asst. State's Atty., Jamestown, for plaintiff and appellant.
Richard D. Varriano (no appearance), Moorhead, MN, and Peter B. Crary (appearance), Fargo, for defendant and appellee. Argued by Lisa Borgen, third-year law student.
LEVINE, Justice.
The State of North Dakota appeals from a district court order that two prior convictions of Michael J. Keyes for driving while under the influence of alcohol could not be used for enhancement purposes. We reverse and remand for further proceedings.
On June 29, 1988, and July 18, 1990, Keyes, appearing without counsel, pleaded guilty to DUI. On June 4, 1991, Keyes, appearing with counsel, pleaded guilty to a third DUI in a five-year period, which enhanced the seriousness of that offense from a *359 class B to a class A misdemeanor. On June 14, 1994, Keyes was charged under N.D.C.C. § 39-08-01[1] with a class A misdemeanor for a fourth DUI in a seven-year period. Keyes moved for an "order certifying the [1994 charge] as a second offense on the grounds that the convictions of June 29, 1988 and July 18, 1990 did not provide ... a factual basis" prior to the court's acceptance of his guilty pleas. The court granted Keyes' motion, holding that the failure of the record to reveal a factual basis for Keyes' 1988 and 1990 uncounseled guilty pleas, precluded the use of those prior convictions, see N.D.R.Crim.P. 11(e), to enhance the 1994 offense from a class B to a class A misdemeanor. The State appealed.
The State's right to appeal in a criminal action is governed by N.D.C.C. § 29-28-07. E.g. State v. Simon, 510 N.W.2d 635 (N.D.1994). We must dismiss an appeal by the State if it does not meet the jurisdictional requirements of N.D.C.C. § 29-28-07. Simon, supra. Section 29-28-07(1), N.D.C.C., authorizes the State to appeal from "[a]n order quashing an information or indictment or any count thereof."
Under the circumstances of this case, the trial court's exclusion of Keyes' two prior uncounseled convictions is analogous to an order quashing an information. Keyes was charged with DUI by a criminal complaint which alleged that the offense was a class A misdemeanor because it was his fourth offense within a seven-year period. Under N.D.C.C. § 39-08-01(2), a fourth DUI conviction in a seven-year period enhances the seriousness of the offense from a class B to a class A misdemeanor. The trial court's order essentially reduced the charge against Keyes from a class A to a class B misdemeanor, thereby effectively quashing the class A misdemeanor charge against him. State v. Hogie, 424 N.W.2d 630 (N.D.1988). This case may be contrasted to City of Fargo v. Cossette, 512 N.W.2d 459 (N.D.1994), an appeal we dismissed because Cossette's prior convictions enhanced the sentence, but not the offense. Thus, the prior convictions were not regarded as elements of the offense and, consequently, did not have the effect of quashing the offense charged in the complaint. Here, the trial court's order had the effect of quashing the class A misdemeanor charge against Keyes and therefore, it is appealable under N.D.C.C. § 29-28-07(1).
The State contends that Keyes waived any defects in his 1988 and 1990 uncounseled guilty pleas and resulting convictions when, in 1991, with representation of counsel, he pleaded guilty to a third DUI in a five-year period, a class A misdemeanor. That waiver, says the State, makes Keyes' 1988 and 1990 convictions available for enhancement purposes. We agree.
In State v. Slapnicka, 376 N.W.2d 33 (N.D.1985), we considered a similar issue. Slapnicka had entered an uncounseled guilty plea to a DUI charge in January 1982. In October 1982, he was convicted of actual physical control of a motor vehicle while under the influence of intoxicating liquor. In January 1984, Slapnicka, appearing with counsel, pleaded guilty to a third DUI within a five-year period, which enhanced the seriousness of that offense from a class B to a class A misdemeanor. After retaining different counsel, Slapnicka applied for post-conviction *360 relief from the 1984 conviction, arguing that the 1982 uncounseled guilty plea should not have been used to enhance the 1984 conviction. The trial court denied Slapnicka's application for post-conviction relief.
On appeal, Slapnicka argued that Baldasar v. Illinois, 446 U.S. 222, 100 S.Ct. 1585, 64 L.Ed.2d 169 (1980)[2] precluded the use of the 1982 uncounseled guilty plea to enhance the penalty for the 1984 conviction. In Slapnicka, 376 N.W.2d at 35, we held:
"Generally, a voluntary plea of guilty waives all nonjurisdictional defects alleged to have occurred prior to the guilty plea. State v. Gilley, 289 N.W.2d 238, 240 (N.D.1980); State v. Barlow, 193 N.W.2d 455, 457 (N.D.1971). This includes alleged violations of constitutional rights. Gilley, 289 N.W.2d at 240; Barlow, 193 N.W.2d at 457. Applying these rules to the case at hand, we find that Slapnicka, in pleading guilty to a third DUI or physical control offense, waived all violations of constitutional rights alleged to have occurred before the guilty plea was entered. Slapnicka's guilty plea, accordingly, waived the alleged unconstitutionality of using an uncounseled guilty plea to enhance the penalty of a subsequent DUI conviction. Were it not for this waiver, this case would be controlled by State v. Orr, 375 N.W.2d 171 (N.D. Oct. 1, 1985)."[3]
Here, Keyes does not contest the validity of his June 1991 counseled guilty plea, which enhanced that charge from a class B to a class A misdemeanor because it was his third DUI in five years. Keyes' 1991 conviction rested upon his counseled admission that he had committed his third DUI in the previous five years. Under Slapnicka, Keyes' 1991 counseled guilty plea waived the alleged defects in the 1988 and 1990 uncounseled guilty pleas. Applying our decision in Slapnicka to this case, we conclude that, because of Keyes' counseled guilty plea in 1991, the trial court erred in ruling that his uncounseled guilty pleas and resulting DUI convictions in 1988 and 1990 could not be used for enhancement purposes.
We therefore reverse the trial court's order and remand for further proceedings consistent with this opinion.[4]
VANDE WALLE, C.J., and NEUMANN, SANDSTROM and MESCHKE, JJ., concur.
NOTES
[1]  N.D.C.C. § 39-08-01 says in part:

"2. A person violating this section or equivalent ordinance is guilty of a class B misdemeanor for the first or second offense in a five-year period, and of a class A misdemeanor for a later offense in a five-year period. Notwithstanding the other provisions of this subsection, a person violating this section or equivalent ordinance is guilty of a class A misdemeanor for the fourth or subsequent offense in a seven-year period. The minimum penalty for violating this section is as provided in subsection 4. The court shall take judicial notice of the fact that an offense would be a subsequent offense if indicated by the records of the director or may make such finding based on other evidence.
* * *
"4. A person convicted of violating this section, or an equivalent ordinance, must be sentenced in accordance with this subsection.
* * *
"d. For a fourth offense within seven years, the sentence must include one hundred eighty days' imprisonment, of which forty-eight hours must be served consecutively and a fine of one thousand dollars."
[2]  In Baldasar v. Illinois, 446 U.S. 222, 100 S.Ct. 1585, 64 L.Ed.2d 169 (1980), a fragmented United States Supreme Court held that an uncounseled misdemeanor conviction punishable by more than six months' imprisonment could not be used to enhance a subsequent sentence. See State v. Orr, 375 N.W.2d 171 (N.D.1985).

The Court overruled Baldasar in Nichols v. United States, 511 U.S. ___ 114 S.Ct. 1921, 128 L.Ed.2d 745 (1994), and held that, consistent with the Sixth and Fourteenth Amendments to the United States Constitution, a sentencing court may consider a defendant's prior uncounseled misdemeanor conviction to enhance a subsequent sentence as long as the prior conviction did not result in a sentence of imprisonment.
[3]  In State v. Orr, 375 N.W.2d 171 (N.D.1985), we held as a matter of state constitutional law that, absent a valid waiver of the right to counsel, an uncounseled guilty plea could not be used to enhance a term of imprisonment for a subsequent offense.
[4]  Because of our resolution of the enhancement issue, we do not address the State's argument that Keyes was required to seek postconviction relief from his two prior convictions rather than waging a "collateral attack" on them by way of this "enhancement proceeding."
