*170OPINION OF THE COURT BY
PADGETT, J.These three cases, which were consolidated here, involve a common question of law. In Baroza, the State had asked for appellee to be sentenced as a repeat offender pursuant to HRS § 706-606.5 and the lower court denied that motion. In Naki and Focht, the same motion was made and the lower court granted the motion.
Under the provisions of HRS § 706-606.5, each of the defendants below would have been sentenced to the mandatory minimum period provided in that section if the conviction for which he was being sentenced occurred “within the time of the maximum sentence of the prior conviction”.
In each case, the defendant below had been previously convicted of a crime and sentenced, on that conviction, to a four-year minimum term under the Young Adult Defendants Sentencing Act (HRS § 706-667). The respective four-year terms had.each expired by the time the defendant below was convicted in the present case. However, the period of the maximum imposable sentence, had the defendant not been sentenced under the Young Adult Defendants sentencing statute, had not expired in any of the cases.
We have recently held that conviction for the purposes of HRS § 706-606.5 means the judgment entered in the case. State v. Rodrigues, 68 Haw. 125, 706 P.2d 1293 (1985). In each of the cases, when the judgment was entered on the previous conviction, the trial judge had determined, in his discretion, to apply the Young Adult Defendants Sentencing Act (HRS § 706-667) and, accordingly, at that time, the maximum sentence imposable was four years under the express terms of the statute.1
Ted Baker (Arthur E. Ross on the briefs), Deputy Prosecuting Attorneys, for State. Richard Pollack (Alvin T. Sasaki and Gregory K. Tanaka with him on the briefs), Deputy Public Defenders, for Baroza, Naki and Focht.The sentence in No. 9913, State v. Baroza, is affirmed and the sentences in Nos. 9714, State v. Naki, and 9666, State v. Focht, are vacated and those cases are remanded for resentencing consistent with this opinion.
The trial judge can apply HRS § 706-667 only when he had made a determination that imprisonment is appropriate. Having made such a determination, if, in his discretion, he elects to proceed under the section, then a four-year term must be imposed. If the trial judge elects not to apply HRS § 706-667 but to sentence the defendant pursuant to the statutory provisions for the crime in question, then, under the provisions of HRS § 706-606.5, even if the judge pronounces some sentence less than the maximum provided by statute for the crime (whether the sentence given encompasses imprisonment or not), the maximum term of imprisonment imposable for the crime is the appropriate period for measuring whether the previous “maximum sentence” has expired.