
545 N.W.2d 557 (1996)
STATE of Iowa, Appellee,
v.
Clyde Edwin SQUIRES, Appellant.
No. 95-543.
Supreme Court of Iowa.
March 20, 1996.
*558 Linda Del Gallo, State Appellate Defender, and John F. Fatino, Assistant State Appellate Defender, for appellant.
Thomas J. Miller, Attorney General, Thomas S. Tauber, Assistant Attorney General, J. Patrick White, County Attorney, and Teresa Vens, Assistant County Attorney, for appellee.
Considered by HARRIS, P.J., and LARSON, CARTER, NEUMAN, and ANDREASEN, JJ.
PER CURIAM.
Clyde Edwin Squires challenges the sentence imposed upon his conviction, following a guilty plea, of second-offense operating while intoxicated (OWI) in violation of Iowa Code section 321J.2 (1993). He claims the trial court erred in failing to order a substance abuse evaluation prior to sentencing. The State argues Squires failed to preserve error by failing to object when the lack of a substance abuse evaluation became evident at sentencing. We affirm the judgment imposed on Squires' conviction, but vacate the sentence and remand for resentencing.

I. Background Facts and Proceedings.

Squires filed a written guilty plea to second-offense OWI. The matter proceeded to sentencing without the court having ordered a substance abuse evaluation. During the sentencing proceeding, Squires' counsel indicated that a substance abuse evaluation had not been ordered or obtained. Counsel however made no objection to the omission. The court sentenced Squires not to exceed two years incarceration with "the expectation [Squires] will be placed in an OWI program and successfully complete that program."

II. Preservation of Error.

Iowa Code section 321J.2(2)(c) provides: "A person convicted of a second or subsequent [OWI] offense shall be ordered to undergo a substance abuse evaluation prior to sentencing." Similarly, Iowa Code section 321J.3(1) provides:
If the defendant is charged with a second or subsequent [OWI] offense the court shall order the defendant, on conviction, to undergo a substance abuse evaluation and the court shall order the defendant to follow the recommendations proposed in the substance abuse evaluation for appropriate substance abuse treatment for the defendant.
In State v. Moyer, 382 N.W.2d 133 (Iowa 1986), we interpreted a 1984 amendment to Iowa Code section 321.281(2)(c) (1983), which adopted language nearly identical to that used in section 321J.3(1). In Moyer, we determined the new language mandated a substance abuse evaluation for persons with two or more OWI convictions. 382 N.W.2d at 135. Noting that the amendment encouraged treatment for persons with substance abuse problems, we held:
Defendant was entitled to have the statutorily prescribed substance abuse evaluation completed and reported to the district court before sentencing. The sentencing court ordered no evaluation and had not received equivalent information before imposing sentence. We therefore must vacate the sentence entered, though not the judgment and conviction.
Id. at 136. Such treatment is not only for the benefit of the defendant but also for the public at large. Id.
*559 It is clear that, with limited exceptions, a court is obligated to order a substance abuse evaluation prior to sentencing a defendant to a second or subsequent OWI offense. See State v. Ludley, 465 N.W.2d 912, 913-14 (Iowa App.1990) (substance abuse evaluation acquired before pretrial release amounted to substantial equivalent of evaluation ordered specifically for purposes of section 321J.3(1)). The State admits that under sections 321J.2(2)(c) and 321J.3(1) it is mandatory that a court order a substance abuse evaluation prior to sentencing a defendant for a second or subsequent OWI offense. It also admits the court failed to order such an evaluation, but maintains Squires' failure to object at sentencing amounts to a waiver of error on his claim. Citing State v. DeWitt, 286 N.W.2d 379, 383 (Iowa 1979), it argues Squires should not be allowed to elect to go forward despite a known error and then seek reversal on appeal based upon this error.
The State's argument overlooks the fact that the public at large has an interest in the evaluation and potential treatment which may not be identical with the interests of the defendant. We think our holding in Moyer presupposes such a public interest. Evaluation and possible treatment can benefit the public by aiding persons who, but for substance abuse, would make useful citizens who would pose no threat to society.
Because of the public interest in the evaluation requirement, we do not believe a defendant must object in order to preserve error. If a defendant could waive error by failing to object the societal benefit we have noted would be lost. Accordingly we hold a defendant need not object at sentencing in order to preserve error on direct appeal from the court's failure to order a substance abuse evaluation pursuant to sections 321J.2(2)(c) and 321J.3(1).

III. Conclusion.

The court erred in failing to order a substance abuse evaluation prior to sentencing Squires for his second-offense OWI. We reject the State's claim that Squires' failure to object at sentencing amounted to a waiver of his claim. We affirm the judgment entered upon Squires' conviction. Squires' sentence is vacated and the matter is remanded to the district court for resentencing once a substance abuse evaluation has been obtained.
AFFIRMED IN PART, REVERSED IN PART AND REMANDED.
