
521 N.W.2d 134 (1994)
STATE of South Dakota, Plaintiff and Appellee,
v.
Craig Joseph WAHLE, Defendant and Appellant.
No. 18441.
Supreme Court of South Dakota.
Considered on Briefs May 26, 1994.
Decided September 7, 1994.
*135 Mark Barnett, Atty. Gen., Ann C. Meyer, Asst. Atty. Gen., Pierre, for plaintiff and appellee.
Gary W. Conklin of Galland Legal Clinic, Sioux Falls, for defendant and appellant.
PER CURIAM.
Craig J. Wahle (Wahle) pled guilty to one count of second degree rape and the allegations of a Part II Habitual Offender Information. He subsequently sought to withdraw his pleas. In this decision, we hold that the trial court did not abuse its discretion in denying Wahle's motion to withdraw his pleas. Accordingly, we affirm.

FACTS
State filed an indictment charging Wahle with two counts of second degree rape (SDCL 22-22-1(2)) and one count of first degree burglary (SDCL 22-32-1(3)). Along with the indictment, state filed a Part II Habitual Offender Information alleging that, in December, 1980, Wahle was previously convicted of felony, first degree rape. Wahle was arraigned on all of these charges and entered not guilty pleas.
A change of plea hearing was subsequently conducted on the first count of the indictment charging second degree rape. The trial court explained the rape charge and the maximum possible penalty for the offense. Wahle indicated he understood both. The trial court then explained the ramifications of the Habitual Offender Information and the maximum sentence enhancement if Wahle was convicted of both the principal offense and the habitual offender charge. Specifically, the trial court told Wahle that the maximum possible punishment he could receive was life in the state penitentiary without parole. Wahle stated that he understood.
After discussing the charges and the maximum penalties, the trial court went on to readvise Wahle of his constitutional rights and further advised that a guilty plea would waive those rights. Wahle stated that he understood his rights and the ramifications of a guilty plea. At that point, the following exchange occurred:
THE COURT: As to the charge set forth in Count Onethat is, that on or about the 3rd day of February, 1993, in this County and State, you committed the offense of rape in the second degree; what is your plea?
[Wahle]: Guilty, Your Honor.
THE COURT: Plea bargain, Mr. Schroeder [i.e., Wahle's counsel]?
MR. SCHROEDER: Your Honor, in exchange for the guilty plea to this, as well as the Habitual Offender, the State will dismiss Counts Two and Three and the sentence will be less than life, with the discretion of the Court, something less than three hundred yearszero to three hundred years, the Court's discretion.

*136 THE COURT: Do you understand that plea bargain, Mr. Wahle?
[WAHLE]: Yes, I do.
THE COURT: Outside of that plea bargain, have any promises been made to you, to get you to enter a plea of guilty to this charge?
[WAHLE]: No, sir.
THE COURT: Anyone use any force, threats or coercion to get you to plea[d] guilty?
[WAHLE]: No, sir.
THE COURT: The Court finds the plea of the Defendant is a free and voluntary act.
After the above exchange, the trial court canvassed Wahle as to the factual basis for his plea and accepted the plea. Wahle then pled guilty to the habitual offender charge and the trial court found a factual basis for that plea and accepted it. Sentencing was deferred pending completion of a presentence investigation.
Wahle subsequently moved to withdraw his guilty pleas. Wahle and his counsel appeared before the trial court during a hearing on the motion and explained the basis for the motion as follows:
MR. SCHROEDER: Judge, this is basically an oral motion; I didn't file any paperwork on it. I informed both you and the State.
I had a discussion with Mr. Wahle at the jail and basically I think it's his position now that he would like to withdraw his guilty plea to the plea bargain with a cap of 300 years. And I think he's relying on the case of State vs. Lonus (sp); case where they promised him that there wouldn't be a life sentence and then he received 350 years and the Supreme Court said that that was tantamount to a life sentence in violation of the plea bargain. And I think that's kind of the position that he feels he's in is that even though the State agreed to drop it from a life sentence, when he looked at the tables for 300 years, he would go well beyond his life expectancy. And he may want to add some to that, but I think that's where he's coming from.
THE COURT: Mr. Wahle, is there anything you'd like to say in support of your motion in addition to what your attorney has already advised the Court?
DEFENDANT CRAIG WAHLE: I think we had a misagreementmisunderstanding, Your Honor, to the fact that he told me 300-year cap, and Ieither I did not hear him when we were in ourinover at the jail during our discussions and I didn't hear the 300-year cap. So when he mentioned that to you on my sentencing date it was a total surprise to me. Either I missed it or we justwe had a misunderstanding somewhere and I did not hear it.
THE COURT: What did you think the plea bargain was?
DEFENDANT CRAIG WAHLE: The way he explained it to me it was a certain amount of years. That's where our misunderstanding came up. I never heard the end part of that. And I had originally planned to have, you knowII appealed to myI mean I talked to my family about everything that me and Mr. Schroeder's talked about and they both know that I never mentioned the 300 year in the previous discussions up to that date. And the day I got sentenced, I called him and asked him. And my father said why hadn't I mentioned it before. And I said, well, I guess maybeeither I didn't hear him or he didn't make himself clear. And that's where I stood on it. I didn'thave no idea on that until I heard it in this courtroom.
Wahle's motion to withdraw his pleas was denied at the conclusion of the hearing. A judgment was later entered sentencing him to serve 200 years in the state penitentiary. Wahle appeals.

ISSUE

DID THE TRIAL COURT ABUSE ITS DISCRETION IN DENYING WAHLE'S MOTION TO WITHDRAW HIS GUILTY PLEAS?
SDCL 23A-27-11 provides:
A motion to withdraw a plea of guilty or nolo contendere may be made only before sentence is imposed or imposition of sentence *137 is suspended; but to correct manifest injustice a court after sentence may set aside a judgment of conviction and permit the defendant to withdraw his plea.
This court has held that:
The withdrawal of a guilty plea before the imposition of sentence is within the sound discretion of the trial court. SDCL 23A-27-11. There is no absolute right to withdraw a guilty plea but the trial court's `discretion in the matter should be exercised liberally in favor of withdrawal, unless it appears that the State has detrimentally relied upon the plea and the prosecution of the defendant has been thereby prejudiced.' When deciding whether to allow a criminal defendant to withdraw his plea, the trial court must look at the reasons why the plea is sought to be withdrawn and if the request to withdraw is obviously frivolous, the trial court need not grant it.

State v. Grosh, 387 N.W.2d 503, 505-506 (S.D.1986) (citations omitted) (emphasis added).
Wahle contends he should have been allowed to withdraw his guilty plea because it was not voluntary. Similar to the argument in State v. Lohnes, 344 N.W.2d 686 (S.D. 1984), Wahle argues his plea was not voluntary because he misunderstood the 300 year cap on the sentence he would receive as a result of the plea bargain. In Lohnes, we reversed the denial of a motion to withdraw a guilty plea where the plea bargain provided that the defendant would not be sentenced to life and the defendant was ultimately sentenced to 347 years in the penitentiary. In reaching our decision, we focused on the defendant's reasonable expectations from the plea bargain. We concluded that the defendant could have reasonably understood the part of the plea bargain that he would be sentenced to a term of years included a promise that he would not receive a sentence exceeding his life expectancy.
As authority for our holding in Lohnes, we relied on United States v. Crusco, 536 F.2d 21 (3rd Cir.1976). In Crusco, the Third Circuit reversed the denial of the defendant's motion to withdraw his plea where there was confusion in the elocution of the plea bargain concerning the maximum seven year sentence and whether a mandatory parole term would be part of that seven years or in addition to it. The circuit court concluded:
Where the record shows that `circumstances as they existed at the time of the guilty plea, judged by objective standards, reasonably justified his mistaken impression,' a defendant must be held to have entered his plea without full knowledge of the consequences and involuntarily. In the instant case, there is sufficient objective proof on the record in statements by the Government and the district judge to support [the defendant's] claim that he misunderstood the maximum sentence he faced.
Crusco, 536 F.2d at 24-25 (citations omitted) (emphasis original).
Lohnes and Crusco establish that the withdrawal of a guilty plea, even prior to sentencing, is not subject to the whim or caprice of the defendant. Rather, it is a matter that lies solely within the discretion of the trial court. Although, before sentencing, that discretion is to be exercised liberally in favor of withdrawal, the trial court must still look at the reasons why withdrawal is sought. If, as in Crusco and Lohnes, there is sufficient objective proof on the record of the defendant's misunderstanding of the maximum sentence he faced, then the plea is considered to have been entered without full knowledge of the consequences and involuntarily. Under these circumstances, the trial court's discretion should favor withdrawal of the guilty plea. However, as we said in Grosh, supra, if the request to withdraw is frivolous, the trial court need not grant it.
Wahle's request to withdraw his plea was obviously frivolous and distinguishable from that in Lohnes. In Lohnes, there was never any discussion during elocution of the plea agreement that the defendant's sentence to a term of years could be to a term exceeding his life expectancy. Here, Wahle's own counsel outlined the terms of the plea bargain and he specifically mentioned that the sentence would be, "something less than three hundred yearszero to three hundred years..." (emphasis added). When asked if he *138 understood the plea bargain, Wahle unhesitatingly replied, "[y]es, I do." It is difficult to see how the terms of the plea bargain could have been made more plain and also difficult to see how Wahle could have held any expectation other than that the maximum penalty he faced was a 300 year sentence to the state penitentiary. In view of the clear explanation of the plea bargain, Wahle's claims of misunderstanding, misapprehension and involuntariness ring hollow. See, U.S. v. Dalman, 994 F.2d 537 (8th Cir. 1993) (defendant's performance during plea hearing inconsistent with his after-the-fact claim of misunderstanding of proceedings and involuntariness of guilty plea).
The record of entry of Wahle's guilty plea fails to contain any objective facts whatsoever that can be viewed as reasonably justifying a mistaken impression as to the maximum possible penalty for his offense. To the contrary, all pertinent facts and consequences were carefully explained and Wahle unhesitatingly indicated his understanding of the plea bargain and its effects. Therefore, we find no abuse of discretion in the denial of Wahle's motion to withdraw his guilty pleas.
Affirmed.
MILLER, C.J., and WUEST, HENDERSON, SABERS and AMUNDSON, JJ., participating.
