
162 Ariz. 325 (1989)
783 P.2d 264
The STATE of Arizona, Appellant,
v.
Hector Ivan VARGAS-BURGOS, Appellee.
No. 2 CA-CR 88-0634.
Court of Appeals of Arizona, Division 2, Department A.
November 7, 1989.
Robert K. Corbin, Atty. Gen. by Eric J. Olsson, Tucson, for appellant.
Law Offices of James S. Alexander by James S. Alexander, Tucson, for appellee.
OPINION
HOWARD, Judge.
The state cross-appeals from the sentence imposed by the trial court after appellee pled no contest to unlawful possession of marijuana, a class 4 felony. Appellee, the defendant below, voluntarily moved to dismiss his direct appeal. We remand this matter for resentencing.
Appellee was charged with unlawful possession of marijuana for sale, a class 3 *326 felony, in violation of A.R.S. § 13-3405(A)(2). Pursuant to a plea agreement, appellee pled no contest to unlawful possession, a class 4 felony, in violation of A.R.S. § 13-3405(A)(1). Although the trial court acknowledged the mandatory nature of the applicable sentencing provision at the change-of-plea proceeding, and notwithstanding the fact that the sentencing possibilities were set forth in the presentence report, the only sentence imposed upon appellee was the presumptive term of four years' imprisonment.
Section 13-3405(D), the provision under which appellee was sentenced, provides that the court shall impose a fine upon a person convicted under "any provision of this section" and that suspension of the fine is forbidden. As the trial court recognized and pointed out to appellee during the change-of-plea proceeding, the fine is to be not less than $750 or "three times whatever the street value of that marijuana is ..." Approximately 97 pounds of marijuana were seized in connection with appellee's arrest. Although the trial court grossly overestimated the amount at $400,000, the estimates of the state and appellee's counsel were close to the $150,000 value set forth in the plea agreement as the possible fine. We note that, when the court asked the state whether there was a mandatory fine, the state erroneously responded, "I believe there is a one hundred dollar victim compensation fund fine and I believe five hundred dollars to the state narcotics fund." The trial court corrected the state and proceeded with the discussion regarding A.R.S. § 13-3405(D). Aware of the sentencing possibilities, appellee agreed to proceed with the change of plea and sentencing. In sentencing appellee, however, the trial court failed to impose the mandatory fine required by § 13-3405(D) and the mandatory felony penalty of $100 in accordance with § 13-812(A)(1). The state did not object below, raising the issue for the first time in its cross-appeal. Appellee argues that as a consequence, the state waived the issue. For the reasons stated below, we disagree.
The trial court's sentencing authority is derived from the legislative mandates regarding sentencing, and discretion may be exercised only within the parameters determined by the legislature. State v. Johnson, 116 Ariz. 221, 568 P.2d 1119 (1977); State v. Quintana, 92 Ariz. 308, 376 P.2d 773 (1962); In re Gutierrez, 82 Ariz. 21, 307 P.2d 914 (1957); see also State v. Harris, 133 Ariz. 30, 31, 648 P.2d 145, 146 (App. 1982) ("Courts have power to impose sentences only as authorized by statute and within the limits set down by the legislature."). The sentencing court has no discretion to substitute its own judgment for that of the legislature. State v. Hays, 109 Ariz. 123, 506 P.2d 254 (1973), rev'd on other grounds; State v. Lewis, 109 Ariz. 466, 512 P.2d 9 (1973).
Recognizing that a court's sentencing jurisdiction is statutorily defined, it follows that when a sentencing court fails to abide by the mandates of the applicable statute, it has exceeded its jurisdiction and "is without authority to apply its sound discretion on the matter in question." Arizona Securities, Inc. v. Keene, 89 Ariz. 211, 214, 360 P.2d 221, 223 (1961). In fact, the failure to impose a sentence in compliance with the mandatory provisions of a sentencing statute makes that sentence illegal. See Bozza v. United States, 330 U.S. 160, 67 S.Ct. 645, 91 L.Ed. 818 (1947) (where sentence imposed was less than statutory minimum, it is void, and because a correction to comply with the statute is not an increase of a valid sentence, no double jeopardy problem results); United States v. Green, 735 F.2d 1203 (9th Cir.1984) (where trial court conditioned probation upon payment of taxes, court exceeded its sentencing authority and sentence was void as to excess portion); United States v. Godoy, 678 F.2d 84 (9th Cir.1982) (district court's failure to impose mandatory forfeiture provision for conviction of RICO violations resulted in illegal sentence which should have been corrected upon government's motion to modify sentence); State v. Gonzales, 141 Ariz. 512, 687 P.2d 1267 (1984) (where trial court imposed sentence less than that mandated by statute, state properly appealed under § 13-4032, as sentence *327 was illegal); State v. Webb, 149 Ariz. 158, 717 P.2d 462 (App. 1985) (where statute required the imposition of consecutive sentences, sentence imposing concurrent sentences was illegal sentence, properly objected to by state in cross-appeal). An illegal sentence is void as to its illegal part. Kennedy v. United States, 330 F.2d 26 (9th Cir.1964).
Generally, absent fundamental error, failure to object at trial waives an issue on appeal. State v. Thomas, 130 Ariz. 432, 636 P.2d 1214 (1981). It is traditionally the defendant who may claim fundamental error because, "[f]undamental error is error of such dimension that it cannot be said it is possible for a defendant to have had a fair trial. It usually, if not always, involves the loss of federal constitutional rights." State v. Smith, 114 Ariz. 415, 420, 561 P.2d 739, 744 (1977). A question regarding the court's lack of jurisdiction over the subject matter, however, may be raised at any time, including on appeal. Bruce v. State, 126 Ariz. 271, 614 P.2d 813 (1980); State v. Buckley, 153 Ariz. 91, 734 P.2d 1047 (App. 1987); State v. Municipal Court of City of Phoenix, 124 Ariz. 543, 606 P.2d 33 (App. 1979). We believe that a sentence that is outside the parameters of the applicable statutes, as in the case before us, raises a question of subject matter jurisdiction, that is, the court's power to act. Although it is preferable for any question regarding the appropriateness of a sentence to be brought to the trial court's attention as soon as possible and certainly before the defendant files a notice of appeal, thereby depriving the trial court of jurisdiction to correct the sentence, we do not believe failure to do so waives the issue.
In the instant case, it appears that the trial court fully intended to impose the statutorily mandated fines. This is borne out by the testimony and discussions during the change-of-plea proceeding. It also appears that the failure to impose the statutorily mandated penalties was the result of an oversight on the part of the sentencing judge which went unnoticed by the state. The state may appeal from an illegal sentence under A.R.S. § 13-4032(6) and raised its objection to the sentence imposed in the instant case in a cross-appeal, as it has repeatedly been urged to do. See State v. Tyree, 109 Ariz. 259, 508 P.2d 335 (1973), rev'd on other grounds; State v. Lewis, 109 Ariz. 466, 512 P.2d 9 (1973); State v. Ambalong, 150 Ariz. 380, 723 P.2d 729 (App. 1986). We believe that the objections to the sentence were properly raised on appeal and were not waived by the state's failure to object below.
We also note that, as the state points out, the sentencing minute entry erroneously provides that appellee was convicted under A.R.S. § 13-3405(A)(1), a class 3 felony. Based upon the oral pronouncements of the trial court and the plea agreement, it is clear that he was convicted under subsection (A)(2), the less serious class 4 felony. The minute entry must be modified to reflect the oral pronouncement in this regard. State v. Hanson, 138 Ariz. 296, 674 P.2d 850 (App. 1983).
The sentence imposed is vacated and this matter is remanded for resentencing.
ROLL, P.J., and HATHAWAY, J., concur.
