
896 N.E.2d 1144 (2008)
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
William H. LEE, Jr., Defendant-Appellant.
No. 5-07-0184.
Appellate Court of Illinois, Fifth District.
October 24, 2008.
*1145 Daniel M. Kirwan, Deputy Defender, E. Joyce Randolph, Assistant Defender, Office of the State Appellate Defender, Mt. Vernon, IL, for Appellant.
William A. Mudge, Madison County State's Attorney, Edwardsville, IL, Norbert J. Goetten, Director, Stephen E. Norris, Deputy Director, Patrick D. Daly, Staff Attorney, Office of the State's Attorneys Appellate Prosecutor, Mt. Vernon, IL, for Appellee.
Justice DONOVAN delivered the opinion of the court:
William H. Lee, Jr., defendant, appeals the denial of his petition for postconviction relief. We affirm.
Defendant pleaded guilty to aggravated battery with a firearm in connection with an incident that occurred on February 15, 2003, in exchange for a prison sentence of 10 years. At the time defendant entered his negotiated plea, he was advised that the potential penalties included 6 to 30 years' imprisonment and 3 years' mandatory supervised release. The plea agreement stated in open court by the prosecutor was that defendant would plead guilty in exchange for a 10-year prison term, with defendant having to serve 85% of the sentence before becoming eligible for parole. The court accepted the plea and sentenced defendant to 10 years' imprisonment with credit for 565 days served. Nothing was said about the mandatory supervised release when the sentence was pronounced or in the sentencing order. Defendant did not pursue a motion to withdraw guilty plea or a direct appeal. Defendant did file a petition for postconviction relief, which was denied by the circuit court of Madison County. In denying the petition, the court held that the recitation of the mandatory-supervised-release term as a part of the general admonishments was sufficient. Defendant argues on appeal that the denial of his petition for postconviction relief must be reversed because he was denied due process of law when he was not advised that his specific plea agreement included a term of 3 years' mandatory supervised release in addition to the 10-year prison term. Relying on People v. Whitfield, 217 Ill.2d 177, 298 Ill.Dec. 545, 840 N.E.2d 658 (2005), defendant further contends that his 10-year prison sentence should be reduced to 7 years to conform to the plea agreement stated in open court.
A defendant's due process rights may be violated when a defendant does not receive the "benefit of the bargain" of his plea agreement. Whitfield, 217 Ill.2d at 186, 298 Ill.Dec. 545, 840 N.E.2d at 664; People v. Holt, 372 Ill.App.3d 650, 652, 311 Ill.Dec. 206, 867 N.E.2d 1192, 1194 (2007). The defendant in Whitfield argued that the trial court was required, under Supreme Court Rule 402(a) (177 Ill.2d R. 402(a)), to admonish him on the record of the statutorily required mandatory-supervised-release term. He further claimed in his petition for postjudgment relief that he was sentenced to a more "onerous" sentence than that to which he had agreed, because at no time during the plea did the prosecutor or the circuit court advise him that he would be subject to the three-year period of mandatory supervised release. Whitfield, 217 Ill.2d at 186, 298 Ill.Dec. 545, 840 N.E.2d at 664-65. The defendant did not ask that his plea be withdrawn but instead that the State be held to the terms of its plea agreement, which would necessitate the elimination of the 3-year term or the reduction of his 25-year sentence. *1146 Whitfield, 217 Ill.2d at 180-81, 298 Ill.Dec. 545, 840 N.E.2d at 661. The court agreed and held that the defendant did not receive the benefit of his bargain because the addition of the mandatory-supervised-release term resulted in a more onerous sentence than the one to which he had agreed in the hearing. Whitfield, 217 Ill.2d at 195, 298 Ill.Dec. 545, 840 N.E.2d at 669. The court further noted that while there need be only substantial compliance with Rule 402 (and an imperfect admonishment is not reversible error unless real justice has been denied or prejudice is inflicted), there can be no substantial compliance with Rule 402 when a defendant pleads guilty in exchange for a specific sentence and the court fails to advise the defendant that a mandatory-supervised-release term will be added to the sentence. Whitfield, 217 Ill.2d at 195, 298 Ill.Dec. 545, 840 N.E.2d at 669.
Whitfield, however, is distinguishable from the instant case. In Whitfield, there was no mention of the mandatory-supervised-release term during the entirety of the proceedings; accordingly, the defendant was not aware of the consequences of his plea. Here, in contrast, the trial court, in advising defendant of the nature of the charge to which he was pleading guilty, expressly admonished him that the offense carried a three-year period of mandatory supervised release. Specifically, the court stated, "That count that you are going to be pleading to * * * is a Class X Felony which carries a maximum $25,000 fine and a sentence of imprisonment not less than six nor more than 30 years in the penitentiary, mandatory supervised release of 3 years." There is nothing in the record to show that what the circuit court described as "mandatory" somehow was no longer mandatory. Nor is there anything in the admonishments that misleadingly suggested defendant's guilty plea removed the mandatory-supervised-release requirement. Cf. People v. Company, 376 Ill.App.3d 846, 315 Ill.Dec. 465, 876 N.E.2d 1055 (2007). The State's failure to restate the mandatory-supervised-release requirement during its recitation of the plea agreement did not violate defendant's due process rights, and defendant received the benefit of his bargain. See Holt, 372 Ill.App.3d at 652-53, 311 Ill.Dec. 206, 867 N.E.2d at 1195. As noted in People v. Jarrett, "Years of [mandatory supervised release] and years in prison are not interchangeable." People v. Jarrett, 372 Ill.App.3d 344, 351, 311 Ill.Dec. 187, 867 N.E.2d 1173, 1179 (2007). Mandatory supervised release is not a "sentence" for the offense itself. Its length is determined by the class of offense to which a defendant is convicted and may be shortened by the Department of Corrections wholly within its discretion. See 730 ILCS 5/3-3-8(a), (b) (West 2004); Jarrett, 372 Ill. App.3d at 351, 311 Ill.Dec. 187, 867 N.E.2d at 1179. Again, as noted in Holt, substantial compliance is what is required by Supreme Court Rule 402. Holt, 372 Ill. App.3d at 653, 311 Ill.Dec. 206, 867 N.E.2d at 1195. As in any Rule 402 admonishment, the question is whether the defendant is advised of the consequences of his plea. Hence, a defendant who is told that he is pleading guilty to an offense that will also require a period of mandatory supervised release has been told of the consequences of his plea. Unlike the defendant in Whitfield who was never made aware of the consequences of his plea, defendant here was properly admonished. See also People v. Borst, 372 Ill.App.3d 331, 334, 311 Ill.Dec. 195, 867 N.E.2d 1181, 1184 (2007) (despite the defendant's contentions that because mandatory supervised release *1147 was explained in a manner that merely suggested it "could" apply and that due process required the court to expressly tell him that his sentence would carry the term, the court's admonitions, while "inartful," nonetheless told the defendant about mandatory supervised release and therefore did not violate the defendant's constitutional right to due process).
For the foregoing reasons, we affirm the denial of defendant's postconviction petition.
Affirmed.
STEWART, P.J., and CHAPMAN, J., concur.
