
755 S.W.2d 854 (1988)
STATE of Tennessee, Appellee,
v.
Robert Daniel TERRY, Appellant.
Court of Criminal Appeals of Tennessee, at Nashville.
June 29, 1988.
Karl F. Dean, Sr. Asst. Public Defender, Nashville, for appellant.
W.J. Michael Cody, Atty. Gen. and Reporter, Kymberly Lynn Anne Hattaway, Asst. Atty. Gen., Nashville, for appellee.

OPINION
REID, Judge.
This case presents a Rule 3, T.R.A.P., appeal from the order of the criminal court denying Appellant's motion to "correct the sentence."
The record shows that the sentence imposed is not subject to modification.
Appellant was indicted on two counts of aggravated kidnapping and two counts of aggravated assault. On September 5, 1985 Appellant, with the approval of counsel, filed a "Petition to Enter a Plea of Guilty" in which Appellant asked the court to accept the following negotiated plea agreement: "Kidnapping 10 yrs Range I Aggravated Assault 5 years consecutive  15 years at 30%. All other counts of this indictment are retired." The court entered an order granting the petition and accepting Appellant's guilty plea "as prayed in the petition." The judgment entered on the guilty plea to kidnapping states: "The sentence imposed is: 10 years ... The defendant is a standard offender, Range I."
On April 23, 1987, more than seventeen months after entry of the judgment, Appellant filed a motion which states, "The defendant does not wish to have this matter tried but wishes to have the sentence corrected."
Appellant does not deny that the judgment accurately sets forth the terms of the negotiated plea agreement, nor does he deny that he knowingly and voluntarily entered into the agreement and the plea. He contends that since the penalty for kidnapping, Range I, as provided in T.C.A. § 39-2-302 and T.C.A. § 40-35-109, is a sentence of not less than two nor more than six years the ten year sentence is illegal.
The State insists that because the judgment had become final prior to the filing of the motion the trial court did not have jurisdiction to hear the motion and further that the sentence is not illegal.
The Supreme Court in State v. Burkhart, 566 S.W.2d 871 (Tenn. 1978), noting the distinction between an illegal sentence and an erroneous sentence, held that a sentence in direct contravention of a statute is illegal and can be set aside by a trial court at any time, even after the judgment procedurally has become final.
In State v. Mahler, 735 S.W.2d 226 (Tenn. 1987), a post-conviction case which involved an issue similar to that before the Court, the Supreme Court found that the sentence was not illegal and refused to disturb the judgment. Pursuant to a negotiated plea agreement, the defendant in that case, who had been indicted for murder in the first degree, pled guilty to murder *855 in the second degree and agreed to accept a sentence of fifty years as a Range II aggravated offender, even though there was no factual basis for the imposition of a Range II sentence. The Supreme Court found that the sentence, which was within the statutory limits of ten years to life for murder in the second degree, was not illegal. The Court held that "any question as to the classification of the appellant as a Range II offender or as to his release eligibility was waived by the guilty plea." Id. at 228.
The sentence of ten years, which is within the statutory penalty for kidnapping provided in T.C.A. § 39-2-302, is not illegal. Any irregularity as to classification or release eligibility was waived by the plea of guilty knowingly and voluntarily entered. State v. Mahler, supra.
The order of the trial court denying the motion to modify the sentence is affirmed.
BYERS and WADE, JJ., concur.
