This is an appeal from a judgment of conviction for driving while under the influence (DWI) of an alcoholic beverage, in violation of SDCL 32-23-1, and with having two prior convictions for DWI within the preceding five years, in violation of SDCL 32-23-4.1. We affirm.
The facts relevant to this appeal are undisputed. On September 6, 1979, appellant was convicted of DWI in Stanley County, South Dakota. At the time of these convictions, SDCL 32-23-4.1 provided that they could be used for a period of four years in order to enhance punishment for a subsequent DWI offense. Effective July 1, 1983, our legislature amended SDCL 32-23-4.1 and increased the four-year enhancement provision to five years. The trial court relied upon the amended version of SDCL 32-23-4.1, finding appellant guilty of a third offense of DWI, although the five-year enhancement provision was not in effect at the time of his two prior convictions. *533Appellant was sentenced to eighteen months in the state penitentiary.
Appellant contends that the trial court erred as a matter of law when it found him guilty of a third DWI offense. He argues that the trial court’s reliance on the amended version of SDCL 32-23-4.1 constitutes a retroactive application of the statute, and is therefore a violation of Article I, Section 10 of the United States Constitution and Article VI, Section 12 of the South Dakota Constitution, which prohibit the adoption of ex post facto laws. Further, appellant alleges that the guilty pleas entered at the time of his first and second DWI convictions were rendered involuntary because, at the time they were entered, the trial court informed him that they could be used for enhancement purposes for four years. We disagree.
In State v. Rollinger, 314 N.W.2d 871, 872 (S.D.1982), a case closely analogous to the present appeal, the appellant argued that the trial court violated the constitutional prohibition of ex post facto laws by including a 1975 order of suspension of imposition of sentence as a prior felony when sentencing her as an habitual offender. This court affirmed the trial court’s decision, citing a similar habitual offender appeal in which the United States Supreme Court held:
Nor do we think the fact that one of the convictions that entered into the calculations by which petitioner became a fourth offender occurred before the [habitual offender] Act was passed, makes the Act invalidly retroactive or subjects the petitioner to double jeopardy. The sentence as a fourth offender or habitual criminal is not to be viewed as either a new jeopardy or additional penalty for the earlier crimes. It is a stiffened penalty for the latest crime, which is considered to be an aggravated offense because a repetitive one. (citations omitted)
Gryger v. Burke, 334 U.S. 728, 732, 68 S.Ct. 1256, 1258, 92 L.Ed. 1683, 1687 (1948). See also McDonald v. Massachusetts, 180 U.S. 311, 21 S.Ct. 389, 45 L.Ed. 542 (1901); Carter v. State, 625 P.2d 313 (Alaska App.1981); Danks v. State, 619 P.2d 720 (Alaska 1980); State v. Pendergraft, 124 Ariz. 449, 604 P.2d 1160 (App.1979); State v. Polson, 93 Idaho 912, 478 P.2d 292 (1970); People ex rel. Carey v. Chrastka, 83 Ill.2d 67, 46 Ill.Dec. 156, 413 N.E.2d 1269 (1980); Collins v. State, 275 Ind. 86, 415 N.E.2d 46 (1981); Sayles v. Com., 373 Mass. 856, 367 N.E.2d 833 (1977); State v. Maldonado, 176 Mont. 322, 578 P.2d 296 (1978); and State v. Phillips, 154 N.J.Super. 112, 380 A.2d 1197 (1977).
In State v. Phillips, supra, the court addressed the very issue we face here, stating:
Subsequent offender provisions, such as the one in effect here, do not undertake to punish again for the prior offenses. The prior offense merely provides a background to be considered in sentencing for a subsequent offense. The gravity of the punishment is increased by the persistence of a defendant in the unlawful conduct — conduct which brings him into a class established by law as deserving and requiring a more severe punishment and restraint than he would otherwise receive, (citations omitted)
The ground upon which these statutory provisions is bottomed is that punishment is imposed for the [current] offense only, and that in determining the amount and nature of the penalty to be inflicted the Legislature may require the court to take into consideration the recidivous nature of defendant’s conduct.
Id., 380 A.2d at 1200-01.
In State v. DeMarsche, 68 S.D. 250, 254-55, 1 N.W.2d 67, 69 (1941), this court adopted a similar rationale regarding the punishment of habitual offenders, stating that our habitual offender statute “does not create a new offense, but merely prescribes a punishment for the subsequent offense which in the discretion of the court may be made more severe than the punishment provided for the prior offenses.” This rationale is just as applicable in the present context, and we take this opportunity to adopt it herein. It follows *534that appellant's contention that his guilty pleas to the prior DWI convictions were involuntary is without merit.
Accordingly, the trial court’s judgment is affirmed.
FOSHEIM, C.J., and WOLLMAN and MORGAN, JJ., concur. HENDERSON, J., dissents.