OPINION
In 1991, appellant David Earl Parsons was charged by a criminal complaint, which cited two prior misdemeanor driving under the influence (DUI) convictions, with one count of felony driving under the influence. The underlying facts of the case are set forth in appellant’s prior petition. Parsons v. District Court, 110 Nev. 1239, 885 P.2d 1316 (1994) (Parsons 1). As noted in Parsons I, the justice court granted Parsons’ motion to strike one of the prior misdemeanors and allowed Parsons to enter a guilty plea to misdemeanor DUI. The district court granted the State’s petition for a writ of certiorari and issued an order nullifying the conviction, *93and rescheduled the preliminary hearing in justice court. In Parsons I, this court denied Parsons’ petition for a writ of mandamus or prohibition directing the district court to void its order and vacate the rescheduled hearing.
The rescheduled hearing was held on August 21, 1995, with a different justice of the peace in accordance with this court’s recommendation in Parsons I. At the hearing, Parsons argued that one of the prior misdemeanor DUI convictions, a guilty plea from Beatty Justice Court, was insufficient because the complaint did not allege all essential elements, and the documentation was ambiguous as to whether Parsons had validly waived the assistance of counsel or whether counsel was actually present. The justice court agreed and dismissed the felony charge.
The State asked leave of the district court to file an information by affidavit under NRS 173.035(2) to correct what the State referred to as “the egregious error committed by the magistrate below.’ ’ The information included the affidavits of the prosecutor and of a witness who clarified that in the proceedings involving the questioned conviction, Parsons had waived counsel for the arraignment, but had informed the court that he would be represented by an attorney at further proceedings. The district court found that the error committed by the magistrate was egregious and that the information by affidavit should be filed.
Thereafter, Parsons was arraigned in district court and entered a plea of not guilty. A one-day jury trial was conducted, and the jury found Parsons guilty of driving under the influence with 0.10% or more blood alcohol level. The district court admitted evidence documenting the earlier DUI convictions. Parsons was sentenced to one year in prison and was fined $2,000 for felony DUI. Parsons now appeals.
Parsons argues that the district court erred in finding that the magistrate committed egregious error, and thus, in allowing the State to file an information by affidavit pursuant to NRS 173.035(2). We agree and, accordingly, reverse Parsons’ conviction.
This court has held that NRS 173.035(2) “contemplates a safeguard against egregious error by a magistrate in determining probable cause, [and is] not a device to be used by a prosecutor to satisfy deficiencies in evidence at a preliminary hearing.” Cranford v. Smart, 92 Nev. 89, 91, 545 P.2d 1162, 1163 (1976).
In this case, the justice court, given the information before it, did not commit egregious error in dismissing Parsons’ felony charge.
*94A court may not use a prior misdemeanor DUI conviction to enhance a DUI to a felony unless the records of the conviction demonstrate that the defendant was either represented by counsel or formally waived his right to counsel. Bonds v. State, 105 Nev. 827, 828, 784 P.2d 1, 1-2 (1989). The magistrate had no choice but to dismiss the charge given the ambiguity of the record regarding the prior Beatty DUI conviction. In filing the information by affidavit, the State was impermissibly attempting to satisfy deficiencies in evidence at the preliminary hearing.