
286 N.W.2d 331 (1979)
STATE of South Dakota, Plaintiff and Respondent,
v.
Lemarcus Claussen BACON, Defendant and Appellant.
No. 12765
Supreme Court of South Dakota.
Submitted on Briefs November 16, 1979.
Decided December 24, 1979.
*332 Judith A. Atkinson, Asst. Atty. Gen., Pierre, for plaintiff and respondent; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
Clair R. Gerry of Stuart & Gerry, Sioux Falls, for defendant and appellant.
DUNN, Justice.
Defendant is charged in the information with driving while under the influence of alcoholic beverages (DWI), third offense, which is a felony. The amended information includes the dates of the alleged prior convictions. Defendant appeals from the trial court's denial of his motions to quash part of the information and separate and to suppress evidence. It is apparent that the trial court accepted the State's contentions that (1) prior convictions are now a necessary element of the charge of DWI, third offense; (2) only one information need be used; and (3) the evidence of previous convictions may be introduced at the trial of the primary charge. We granted an intermediate appeal to decide the matter before trial. We reverse.
SDCL 23-32-9, which specifically required previous DWI convictions be set forth in a separate part of the information, was repealed in 1976. The legislature added SDCL 22-7-11, which states that an allegation that a defendant is an habitual criminal must be stated in a separate information. This statute does not, however, make any reference to SDCL 32-23-3 or 32-23-4, which are the statutes dealing with prior DWI convictions. Apparently to clarify matters, the legislature enacted SDCL 32-23-4.2, which provides for a two-part information when prior DWI convictions are involved, but this section was not in effect at the time the defendant was charged.
Neither SDCL 23-32-9 nor SDCL 32-23-4.2 was in effect when defendant was charged. We find that SDCL 32-23-4, which provides for an enhanced penalty, was the effective statute and is determinative of the legislative intent. SDCL 32-23-4 provides that "[i]f conviction for a violation of § 32-23-1 is for a third offense" the provision of SDCL 32-23-4 for an enhanced penalty shall apply. This language indicates legislative intent that there must be a conviction of a third DWI offense independent of all other statutes before the enhanced penalty becomes effective.
In State v. Steffenson, 85 S.D. 136, 178 N.W.2d 561 (1970), this court determined that SDCL 32-23-4 was merely a provision for an enhanced penalty. Prior DWI convictions are only material with regard to penalty after the conviction is established, and they are not an essential element of the crime. State v. Biggins, 245 Iowa 903, 63 N.W.2d 292 (1954); State v. Steffenson, supra (citing State v. O'Neal, 19 N.D. 426, 124 N.W. 68 (1909), and State v. Cameron, 126 Vt. 244, 227 A.2d 276 (1967)); State ex rel. Smith v. Jameson, 70 S.D. 503, 19 N.W.2d 505 (1945).
Accordingly, we hold that the previous convictions have no bearing upon defendant's guilt on the primary charge and they should have been set forth in a separate part of the information.
Likewise, we find that the prior convictions cannot be introduced into evidence before the jury in the trial of the primary charge. Both of the previous convictions were misdemeanors. A prior conviction is not admissible for impeachment purposes *333 unless it was a felony. SDCL 19-14-12(1). Prejudice to an accused is avoided when the issue of prior convictions is withheld until there is a conviction on the primary charge. State ex rel. Medicine Horn v. Jameson, 78 S.D. 282, 100 N.W.2d 829 (1960).
The order of the trial court is reversed, and the cause is remanded for further proceedings consistent with this decision.
All the Justices concur.
