
266 N.W.2d 259 (1978)
STATE of South Dakota, Plaintiff and Respondent,
v.
Robert W. LOSIEAU, Defendant and Appellant.
No. 12120.
Supreme Court of South Dakota.
Argued February 16, 1978.
Decided May 25, 1978.
*260 Peter H. Lieberman, Asst. Atty. Gen., Pierre, for plaintiff and respondent; William J. Janklow, Atty. Gen., Pierre, on brief.
Thomas M. Tobin of Maynes, Tonner, Maynes & Tobin, Aberdeen, for defendant and appellant.
MORGAN, Justice.
This is an appeal from the judgment and sentence based upon a plea of guilty entered by the appellant to the charges of grand larceny, third-degree burglary and possession of burglar tools. The appellant bases his appeal on incompetency of counsel, on the trial court's abuse of discretion in refusing to allow the appellant to withdraw a plea of guilty before the sentencing and the failure of the trial court to grant appellant's motion to suppress certain evidence. We uphold the guilty plea and affirm the trial court's denial of the motion to withdraw the guilty plea and to suppress certain evidence.
*261 After the appellant was arrested in Hoven, South Dakota, November 27, 1975, for possession of stolen property, he employed the services of a Nebraska attorney. At the request of counsel, the appellant's right to a speedy trial was waived.[*] The appellant had a preliminary hearing on March 2, 1976, at which time he was bound over on the charges of grand larceny, third-degree burglary, and possession of burglar tools. Arraignment was set for March 4, 1976.
After the arraignment was postponed once, to March 16, 1976, a Pierre attorney appeared at the request of appellant's Nebraska attorney who had contacted local counsel for the first time at 4:00 p.m. the day before. Local counsel moved for a continuance which was denied and arraignment was set for March 19, 1976, and the trial was set to take place on March 23, 1976, which was subsequently postponed for good and sufficient reason until September 20, 1976. On June 15, 1976, appellant's Nebraska counsel filed a motion for a change of venue and one for the suppression of certain evidence obtained from an allegedly unconstitutional search of the appellant's car.
On September 16, 1976, four days prior to trial, the state finally filed the information on the three charges and added a violation of SDCL 22-7, the habitual offender statute, citing four previous convictions in Nebraska for felony violations. Appellant was not arraigned until the day set for his trial, and this was the first time he was apprised of the habitual criminal charge.
Counsel for the appellant and an assistant attorney general, who was prosecuting for the state, entered into a plea bargaining discussion which resulted in the following bargain: (1) appellant would plead guilty to all counts of the original information; (2) the state would dismiss the supplemental information charging under the habitual criminal statute; (3) the appellant's right to appeal from an adverse ruling on the suppression hearing would be preserved; (4) the state would not recommend consecutive sentences.
According to the record, the court proceeded with the arraignment to the point of taking appellant's pleas, and then proceeded with a partial suppression hearing relating to appellant's motion to suppress certain evidence. After conducting a partial suppression hearing, the court reinitiated the arraignment and without concluding the suppression hearing or ruling on the motion for a change of venue the court accepted the pleas of guilty from the appellant after the plea bargain was explained to the court.
Sentencing was continued until October 28, 1976, at which time appellant appeared with a new attorney, likewise from Nebraska, and filed a motion to withdraw his guilty plea. The state stipulated that they would not resist appellant's motion to withdraw the guilty plea if the trial would take place within thirty days, and if they could file an amended habitual criminal count.
The following day the hearing on the suppression motion was concluded and the motion to withdraw appellant's guilty pleas was heard. At this hearing the state was represented by the state's attorney of Walworth County, who apparently withdrew the stipulation not to resist and in fact strongly resisted the motion. Both motions were denied by the court.
The first issue to be discussed is whether the appellant has a right to appeal the denial of his motion to suppress evidence after pleading guilty. This court has continually followed the general rule that a voluntary and intelligent plea of guilty entered by the defendant waives his right to appeal nonjurisdictional defects. State v. Jordan, S.D., 261 N.W.2d 126 (1978); State ex rel. Condon v. Erickson, 85 S.D. 302, 182 N.W.2d 304 (1970).
In fact, this court has just recently been faced with this issue in State v. Jordon, supra. In Jordan, the defendant's counsel at the arraignment stated that the defendant wished to reserve his right to appeal any of the rulings previously made by the *262 court, particularly the denial of defendant's motion to suppress certain evidence. The reservation of the right to appeal was not made a part of the plea agreement, and the trial court advised the defendant that by entering his pleas of guilty he would waive his right to appeal the prior rulings of the court. In that case we held that by his plea of guilty he had admitted the facts establishing the essential elements of the crime with which he was charged and thus has waived his right to appeal nonjurisdictional defects. We note that the trial court correctly advised the appellant of his rights against self-incrimination, to a jury trial, confrontation of witnesses, etc., determined that he understood them, and heard a factual basis for the acceptance of the pleas.
Even though, in the case before us now, the additional fact that the reservation of the right to appeal was a part of the plea bargain agreement and the judge did participate in the reservation of the appeal, we feel that the Jordon decision is controlling, and that the general rule is still applicable that a voluntary and intelligent plea of guilty entered by the defendant waives his right to appeal nonjurisdictional defects. We do not find any valid reason to create an exception to Jordan merely based on the acquiescence of the prosecutor and the trial judge.
Appellant also asserts that the trial court abused its discretion in not allowing him to withdraw his guilty plea. The withdrawal of a guilty plea before the entry of judgment is within the sound discretion of the trial judge, SDCL 23-35-22. There is no absolute right to a withdrawal of a guilty plea. The trial court's discretion should be exercised liberally in favor of withdrawal, unless it appears that the state has detrimentally relied upon that plea and the prosecution of the defendant has been thereby prejudiced. State v. Doherty, S.D., 261 N.W.2d 677 (1978).
In this case we do find that the state had relied upon appellant's guilty plea to the detriment of their case. The record shows that after the guilty plea had been entered, the state's attorney's office returned most of the evidence of the larceny to the owner. We feel that this situation meets the exception as expressed in Doherty, supra.
A trial judge in determining whether he should allow a defendant to withdraw his plea must also look at the reasons why. In this case the only reason was the fact that the appellant had apparently changed his mind, as well as his counsel, and now decided to profess his innocence.
In People v. Zaleski, 375 Mich. 71, 133 N.W.2d 175, 179 (1965) that court in discussing whether a trial judge should have granted a request to withdraw a guilty plea stated:
[T]he trial judge need not grant such request, although made before trial and sentence and although innocence is asserted, when persuaded that the request is obviously frivolous.
Here the trial judge stated that he thought this to be another stall-type tactic by the appellant and, therefore, would not allow him to withdraw his plea. Thus, it was in his discretion, having made that determination, that it was a frivolous request whether to permit the withdrawal of the guilty plea, and we find that he did not abuse that discretion.
Finally, appellant alleges ineffective assistance of counsel in that his first attorney failed to interview or subpoena any of the witnesses the appellant had named before trial; did not allow enough time to try the case when he arrived at 4:00 a. m. the day of the trial and had to be back in Omaha the next day; did not fully understand the habitual criminal act; nor did counsel tell him that he would be waiving his right to appeal by pleading guilty. The appellant's attorney also failed to present evidence and get a ruling on the motion for a change of venue and allowed the appellant to plead guilty prior to the suppression hearing being decided.
This contention was eloquently argued to the trial court by the second defense counsel at the time he requested leave to withdraw the plea of guilty and in support of that motion. The trial court in denying the motion to withdraw the plea noted:
The court has taken into consideration the sophistication and the intelligence of *263 the defendant. Certainly, in all of the defendant's appearances before this court he has exhibited a high degree of intelligence as well as sophistication which is born out by the records in this case.
The court further noted that delay tactics are common to the defense of most cases. Further, that counsel had advised him of a possible scheduling difficulty and that it had been corrected and that he would be present and prepared for trial. That he was present and that the contact that the court had with him indicated that he appeared to know what he was doing and appeared to be an experienced criminal lawyer. Appellant's counsel was not appointed, but was of his own choosing. Appellant's choice to get an out-of-state counsel in retrospect might not have been a very good tactical move but does not necessarily mean that the Nebraska attorney was incompetent. Since the trial judge was on the scene and observed counsel, his observations would be far more persuasive than the appellant's bare assertions of incompetent conduct and we find no abuse of discretion on the part of the trial judge in denying the motion based on the issue of incompetent counsel.
For the reasons heretofore mentioned, we affirm the decision of the trial court.
DUNN, C. J., and PORTER and WOLLMAN, JJ., concur.
ZASTROW, J., dissents.
ZASTROW, Justice (dissenting).
I dissent.
As I understand the defendant's motion to withdraw the guilty plea, it was based upon the advise of his new counsel that the right to appeal the legality of the search of his car would have been waived by the guilty plea. From the majority's position here and in State v. Jordan, 1978, S.D., 261 N.W.2d 126, that advice was sound.
As I understand the record, the state's attorney and trial judge maintained that a withdrawal of the plea was not necessary because his right to appeal from the denial of the motion to suppress was not waived.[1]
Thus the defendant's guilty plea was entered upon the basis of the trial court's incorrect opinion that the right of appeal would not be waived. If the motion to withdraw the guilty plea resulted in a delay, it appears that it was caused more by the representations of the assistant attorney general, the state's attorney, the trial court, South Dakota defense counsel and out-of-state defense counsel than by the defendant himself.
If there was any prejudice caused to the state, it was not because of the defendant's guilty plea, but by the incorrect assurances by the attorneys and trial court that the ruling on the motion to suppress could be appealed. Furthermore, I am unable to find that the state would have been prejudiced by the withdrawal when the assistant attorney general was willing to stipulate to the withdrawal on the condition that the habitual criminal count be refiled and the matter set for trial.
The plea bargain should either be honored and the trial court's ruling on the motion to suppress be reviewed by this court (see Jackson v. State, 1974, Fla.App., 294 So.2d 114)[2] or because the plea agreement cannot be accomplished, the defendant should be allowed to withdraw his plea (see United States v. Caraway, 1973, 5th Cir., 474 F.2d 25; United States v. Mizell, 1973, 5th Cir., 488 F.2d 97; United States v. Cox, 1972, 6th Cir., 464 F.2d 937).
NOTES
[*]  The record contains a written waiver of this right signed by both the appellant and his counsel, which distinguishes it from the issue presented in State v. Black Feather, S.D., 266 N.W.2d 563 (decided June 8, 1978).
[1]  I hasten to point out that in State v. Max, 1978, S.D., 263 N.W.2d 685, the defendant waived a jury trial and stipulated to a court trial based upon the preliminary hearing transcript in order to preserve his right to appeal from an adverse ruling on a motion to suppress physical evidence.
[2]  Such a position would not be consistent with State v. Jordan, supra, because there the reservation of the right to appeal the suppression issue was not the basis of the guilty plea and the defendant was specifically advised that it would be waived.
