
273 Kan. 726 (2002)
45 P.3d 852
STATE OF KANSAS, Appellee,
v.
WILLIAM ANTHONY, Appellant.
No. 86,674.
Supreme Court of Kansas.
Opinion filed May 7, 2002.
Virginia Girard-Brady, of Lawrence, argued the cause and was on the brief for appellant.
Terra D. Morehead, assistant district attorney, argued the cause, and Nick A. Tomasic, district attorney, and Carla J. Stovall, attorney general, were with her on the brief for appellee.
The opinion of the court was delivered by
SIX, J.:
This case addresses defendant William Anthony's challenge to the duration of his postrelease supervision sentence based on his reading of State v. Gould, 271 Kan. 394, 23 P.3d 801 (2001), and Apprendi v. New Jersey, 530 U.S. 466, 147 L. Ed.2d 435, 120 S. Ct. 2348 (2000). We also raise sua sponte the issue of whether Anthony's sentence was an illegal sentence.
Anthony was convicted by a jury of aggravated indecent liberties with a child, a severity level 3 crime. K.S.A. 21-3504(a)(3) (lewd fondling or touching). The district court imposed a sentence of 92 months' incarceration, to be followed by a period of postrelease supervision. The period of supervision was extended from 36 to 60 *727 months based on the judge's post-conviction findings. See K.S.A. 1998 Supp. 22-3717(d)(1)(C)(i), now K.S.A. 2001 Supp. 22-3717(d)(1)(D)(i). Anthony argues that the extended period of postrelease supervision constituted an unconstitutional upward durational departure. We disagree.
Our jurisdiction is under K.S.A. 20-3018(c) (transfer on our own motion).

DISCUSSION
Anthony does not question either his conviction or his underlying sentence of incarceration. The sole issue in his appeal is whether his constitutional rights were violated when the district court, based on "the nature of this offense," extended his postrelease supervision period. Anthony did not object to the extended postrelease period. His counsel agreed that the district court had the discretion to impose the extended period. Anthony argues for the first time on appeal that, under Gould, which followed Apprendi, his constitutional rights were violated.
Anthony's constitutional challenge involves a question of law over which we have unlimited review. See State v. Crow, 266 Kan. 690, Syl. ¶ 2, 974 P.2d 100 (1999). Generally, "[w]hen constitutional grounds are asserted for the first time on appeal, they are not properly before [this court] for review." State v. Shears, 260 Kan. 823, 837, 925 P.2d 1136 (1996). However, in Pierce v. Board of County Commissioners, 200 Kan. 74, Syl. ¶ 3, 434 P.2d 858 (1967), we recognized exceptions to the general rule. We recently relied on the Pierce exceptions in order to address an Apprendi argument raised for the first time on appeal in Gould. We follow our reasoning in Gould and consider the extended postrelease issue here.
In Apprendi, the United States Supreme Court held: "Other than the fact of a prior conviction, any fact that increases the penalty for a crime beyond the prescribed statutory maximum must be submitted to a jury and proved beyond a reasonable doubt." 530 U.S. at 490.
In Gould, we applied Apprendi to hold that the Kansas Sentencing Guidelines Act's (KSGA) scheme for imposing upward *728 durational departure sentences violates the due process and jury trial rights contained in the Sixth and Fourteenth Amendments to the United States Constitution. See 271 Kan. at 413. We said: "Under Apprendi, it does not matter how the required finding is labeled, but whether it exposes the defendant to a greater punishment than that authorized by the jury's verdict." 271 Kan. at 410. We noted that the district court had imposed two 68-month sentences upon Gould, going beyond the maximum sentence in the applicable grid box for each crime. Thus, Apprendi applied.
The resolution of Anthony's claim requires our examination of the appropriate sentencing statutes. We begin by observing that postrelease supervision is mandatory. K.S.A. 2001 Supp. 22-3717(d)(1). Postrelease supervision is a component of the underlying prison sentence. An inmate has not served his or her sentence until the postrelease period is complete. K.S.A. 22-3722.
Because Anthony was convicted of aggravated indecent liberties with a child, a severity level 3 nondrug offense, he was required to serve 36 months on postrelease supervision. K.S.A. 2001 Supp. 22-3717(d)(1) mandates:
"(A) Except as provided in subparagraphs (D) and (E), persons sentenced for nondrug severity level 1 through 4 crimes ... must serve 36 months, plus the amount of good time earned and retained pursuant to K.S.A. 21-4722 and amendments thereto, on postrelease supervision."
The postrelease supervision period may be extended under certain circumstances. K.S.A. 2001 Supp. 22-3717(d)(1)(D)(i) says, in part:
"The sentencing judge shall impose the postrelease supervision period provided in subparagraph (d)(1)(A) [36 months]..., unless the judge finds substantial and compelling reasons to impose a departure based upon a finding that the current crime of conviction was sexually violent or sexually motivated. In that event, departure may be imposed to extend the postrelease supervision to a period of up to 60 months."
K.S.A. 2001 Supp. 22-3717(d)(2) sets forth the definition of a "sexually violent crime," which encompasses a laundry list of offenses complete with statutory citations. Anthony's crime of aggravated indecent liberties appears on the list and thus fits squarely *729 within the definition of a sexually violent crime. See K.S.A. 2001 Supp. 22-3717(d)(2)(C).
Anthony contends that the district court here imposed an upward durational departure sentence by subjecting him to the extended postrelease supervision period. We agree. The statutory maximum penalty for Anthony's crime includes a 36-month postrelease period. The district court's extension of Anthony's postrelease period from 36 to 60 months increased the penalty for his crime beyond the statutory maximum.
The question becomes whether the increased postrelease period runs afoul of the protections outlined in Apprendi and Gould. We conclude that it does not. Here, the district court simply used the fact that Anthony was convicted of aggravated indecent liberties, by definition a sexually violent crime, to impose an extended postrelease supervision period under K.S.A. 2001 Supp. 22-3717(d)(1)(D)(i). In doing so, the court was not required to make an additional finding of fact beyond that made by the jury. Because the fact relied upon to extend the period of postrelease supervision was found by a jury beyond a reasonable doubt, the 60-month postrelease period imposed does not violate Apprendi or Gould.
We conclude that: (1) the district court's "nature of the offense" basis for imposing an extended postrelease period referred to the fact that aggravated indecent liberties is statutorily defined as a sexually violent crime, (2) Anthony's conviction of aggravated indecent liberties constituted a substantial and compelling reason to impose the postrelease supervision departure, and (3) the departure here does not violate either Apprendi or Gould.
The district court's "nature of the offense" finding is sufficient to comply with K.S.A. 2001 Supp. 22-3717(d)(1)(D)(i). However, the better practice for a district court in imposing a durational postrelease supervision departure under these circumstances is to state specifically and on the record the "substantial and compelling reasons to impose a departure," i.e., that the current crime of conviction was sexually violent.
Under the facts here, the increase in Anthony's postrelease supervision period from 36 to 60 months, supported by the jury's finding, was an acceptable departure.


*730 ANTHONY'S PRISON SENTENCE
The record reflects that the offense leading to Anthony's conviction by a jury occurred on February 19, 1999. Anthony had a criminal history score of E under the KSGA. His crime was a severity level 3. On the date of Anthony's offense, the presumptive range in the 3-E grid box was 68-73-77 months' imprisonment. See K.S.A. 1998 Supp. 21-4704(a). On the date of sentencing, November 17, 2000, the presumptive range in the 3-E grid box was, and remains, 82-88-92 months' imprisonment. See K.S.A. 2001 Supp. 21-4704(a). The district court here looked to the latter range and imposed 92 months' incarceration, the aggravated sentence in the grid box. The question we raise sua sponte is whether the length of Anthony's sentence is dictated by the presumptive range in effect on the date of his offense or on the date of his sentencing. See K.S.A. 22-3504 (the court may correct an illegal sentence at any time).
The controlling penalty provisions are those in effect at the time the offense is committed. State v. Patterson, 257 Kan. 824, 825, 896 P.2d 1056 (1995). Where the penalty for an offense has been changed by the legislature after the offense, the penalty imposed must be under the law as it stood on the date the offense was committed. State v. Standifer, 24 Kan. App.2d 441, 444-45, 946 P.2d 637, rev. denied 263 Kan. 890 (1997); see also State v. Downey, 27 Kan. App.2d 350, 366, 2 P.3d 191, rev. denied 269 Kan. 936 (2000) (trial court must rely on sentencing guidelines in effect on the date of the offense). Anthony's underlying sentence of imprisonment is vacated, and the case is remanded for resentencing according to the KSGA grid in effect on the date of his offense.
We remand for resentencing in accordance with our opinion.
DAVIS, J., not participating.
BRAZIL, S.J., assigned.[1]
NOTES
[1]  REPORTER'S NOTE: Judge J. Patrick Brazil was appointed to hear case No. 86,674 vice Justice Davis pursuant to the authority vested in the Supreme Court by K.S.A. 20-2616.
