
735 S.W.2d 226 (1987)
STATE of Tennessee, Appellee,
v.
Thomas Lee MAHLER, Appellant.
Supreme Court of Tennessee.
August 10, 1987.
Steven C. Douglas, Crossville, for appellant.
W.J. Michael Cody, Atty. Gen. and Reporter, Albert L. Partee, III, Asst. Atty. Gen., Nashville, for appellee.

OPINION
HARBISON, Justice.
In this post-conviction proceeding appellant challenges the sentence which he received after pleading guilty to the offense of murder in the second degree. He had been indicted for murder in the first degree on October 23, 1983. Appointed counsel thoroughly investigated the case and repeatedly sought to strike a plea bargain agreement with the District Attorney General. Finally on March 21, 1984, appellant *227 entered a guilty plea to murder in the second degree with an agreed sentence of fifty years in the penitentiary as a Range II aggravated offender. As a part of the agreement, related charges of larceny of an automobile and receiving and concealing stolen property were voluntarily dismissed by the State with the approval of the trial judge.
The offense was a highly aggravated one, and had the prosecution proceeded appellant was in grave danger of receiving the death penalty or, almost at a minimum, a sentence of life imprisonment for murder in the first degree. He deliberately strangled to death a young naval officer who had given him a ride in the officer's automobile. He placed the body of the officer and some of the latter's personal possessions near an exit on Interstate 40 in the vicinity of Crossville, Tennessee, and proceeded to Arkansas and then Missouri in the officer's automobile. His confession was video taped and is in the record of the post-conviction proceedings. Appellant confessed to deliberate, unprovoked murder of his victim, and there was little reason for the State to strike a plea bargain other than that the victim's family were from out of state and that the trial would have been both an inconvenient and harrowing experience for them.
Counsel appointed for appellant thoroughly investigated the case and realized its seriousness. He was finally able to elicit from the District Attorney General the plea bargain above referred to, and it was knowingly, voluntarily and intelligently accepted by appellant. The trial judge carefully followed the provisions of relevant statutes and cases in accepting the guilty plea, which almost certainly appears to have been in the manifest best interests of appellant.
Less than six months later, however, appellant filed a post-conviction petition alleging that he had received ineffective assistance of counsel. Both the trial court and the Court of Criminal Appeals agreed that this claim was overwhelmingly refuted by the record, and that conclusion is supported by abundant material evidence.
It appears, however, that appellant did not have a prior criminal record sufficient to justify his being sentenced as a Range II offender under ordinary circumstances. He therefore contends that the sentence imposed was illegal and that his attorney failed to render competent or effective legal services by not advising him of that fact.
Both the trial judge and the majority of the panel of the Court of Criminal Appeals which reviewed the case upheld the sentence and dismissed the post-conviction petition. There was a dissenting opinion, however, filed in this case, and the issue has also divided other panels of the Court of Criminal Appeals. For this reason we granted review.
We affirm the judgment of the Court of Criminal Appeals. The sentence in this case, fifty years, is not an illegal sentence. The punishment for murder in the second degree is imprisonment for life or for a period of not less than ten years. T.C.A. § 39-2-212.
It is true that appellant would not have qualified as a Range II offender had he been sentenced after trial. Further he was not advised that he would not ordinarily qualify for a Range II sentence. As conceded in the dissenting opinion in the Court of Criminal Appeals:
"... The record makes it abundantly clear that had such been explained to him, he would still have pled guilty and accepted the sentence and Range classification as offered, because the appellant's prime interest was to get the benefit of a lesser offense than first degree murder, as was charged in the indictment."
The record clearly supports this conclusion, and there is no showing that any error of counsel in not explaining release eligibility prejudiced the defense in any way. Counsel had been given full access to the District Attorney's General's file, including a confession given by the defendant to the Tennessee Bureau of Investigation. He had also viewed the video taped confession which appellant had given in the State of Missouri and had satisfied himself *228 that appellant was legally arrested on probable cause while in Missouri. The confessions were clearly voluntary. No issue of self-defense could reasonably be asserted. Counsel discussed with appellant the various elements of the offense, the penalties, and his prospects of acquittal, including discussions of parole eligibility and maximum sentence.
Any error by counsel in not explaining the differences between Range I and Range II offenders did not and could not warrant setting aside the guilty plea and sentence under the circumstances of this case. See generally Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674 (1984).
It is generally true, as pointed out in the dissenting opinion, that a judgment imposed by a trial court in direct contravention of express statutory provisions regarding sentencing is illegal and is subject to being set aside at any time, even if it has become final. See State v. Burkhart, 566 S.W.2d 871 (Tenn. 1978). In that case, however, the trial judge had ordered a sentence for escape to be served concurrently with a previous sentence in direct contravention of a statute requiring the sentence to be consecutive.
There have been other cases where sentences were imposed which were higher or lower than that authorized by the statute designating the punishment for the crime. In those cases the sentences have been held subject to being later vacated or corrected. See State v. Hamlin, 655 S.W.2d 200, 201 (Tenn. Crim. App. 1983).
As previously stated, that is not the situation here. The sentence imposed was clearly within statutory limits fixed for the offense of murder in the second degree. In our opinion any question as to the classification of appellant as a Range II offender or as to his release eligibility was waived by the guilty plea. It was not a constitutional error in and of itself and at most rendered the sentence subject to attack on direct review by appeal. Appellant waived any right of appeal in the guilty plea proceedings, and expressly agreed to be sentenced with the classification and parole eligibility imposed. These were the only terms which the District Attorney General would even consider and, in our opinion, the resulting sentence was clearly lenient and in the best interest of appellant.
Any error of his attorney in not advising him of the distinctions between Range I and Range II offenders under the circumstances of this case had no effect whatever upon the defense or the disposition of the original criminal charges.
The judgment of the Court of Criminal Appeals is affirmed at the cost of appellant.
BROCK, C.J., and FONES, COOPER and DROWOTA, JJ., concur.
