
397 N.W.2d 875 (1986)
STATE of Minnesota, Appellant,
v.
James A. FORD, Respondent.
No. CX-85-719.
Supreme Court of Minnesota.
December 26, 1986.
*876 Hubert H. Humphrey, III, Atty. Gen., St. Paul, R. Kathleen Morris, Scott County Atty., Shakopee, for appellant.
Phillip Gainsley, Minneapolis, for respondent.
Heard, considered and decided by the court en banc.
WAHL, Justice.
James Ford was convicted on pleas of guilty of two counts of misconduct of a public officer or employee in violation of Minn.Stat. § 609.43(2) (1984). The court of appeals held that the acts to which Ford pleaded guilty did not constitute misconduct within the meaning of section 609.43(2) and reversed the judgment of conviction. We reverse the court of appeals on this issue, affirm the order of the trial court denying Ford's motion to withdraw his guilty plea and reinstate the judgment of conviction.
James Ford was assistant principal and teacher of history at Shakopee High School during the years 1980-84. His duties included student discipline, curriculum development, staff supervision and serving as high school speech coach. He was charged in May, 1984, by complaint with 10 counts *877 of misconduct by a public officer or employee, Minn.Stat. § 609.43(2) and (3), gross misdemeanors; one count of sodomy, Minn. Stat. § 609.293, subd. 5, a gross misdemeanor; and one count of fornication, Minn.Stat. § 609.34, a misdemeanor. The complaint alleged in considerable detail that, during the course of his employment, Ford granted special favors and privileges to four specific minor female students at Shakopee High School and received from those students acceptance of his sexual advances and sexual contact, including hugging, kissing and fondling and, from one of the students, oral sex and sexual intercourse. It was alleged specifically that, in violation of school rules and regulations, Ford permitted these students to smoke in his office on school grounds, to avoid certain physical education requirements, to miss class and leave school during school hours for unauthorized purposes and to obtain access to his office after school hours. For one student he wrote and typed a term paper. The facts alleged tended to show, the state claims, that Ford cultivated special relationships with the female students which developed into consensual sexual relationships when they reached the age of 16.[1]
The state gave notice of intent to introduce evidence of additional offenses based on similar conduct in two other counties in 1975-76. At the omnibus hearing on July 27, 1984, Ford moved for a change of venue and for suppression of the Spreigl evidence. He also moved for dismissal of the complaint on the ground that there was insufficient evidence shown of probable cause to believe he had committed the offenses charged. On August 29, 1984, the trial court granted a change of venue, refused to suppress the Spreigl evidence and denied the motion to dismiss the charges for lack of probable cause. The trial court found that the conduct alleged in the complaint was sufficient to show probable cause that the crimes charged under section 609.43(2) and (3) had been committed by Ford.
After the motion to dismiss had been denied and the case set for trial, Ford and his attorney negotiated a plea agreement with the state. Ford appeared in court at the time set for trial and entered a plea of guilty pursuant to that agreement. The plea agreement was read into the record by the state's attorney with the concurrence of Ford and his attorney. Ford would plead guilty to count II and count VI and would submit a factual basis in which he admitted sexual contact with J.A.S. and D.B., the students named in these two charges, and that he had provided unauthorized absences for the two in his official capacity. The state, for its part, would recommend no further incarceration if Ford cooperated fully and completely with the pre-sentence investigation (P.S.I.) and any recommended therapy and would dismiss the 10 remaining charges at the time of sentencing. The trial court conducted a lengthy preplea examination of Ford and told him the court was not bound by promises it did not make, that sentencing was for the court alone to decide. Upon being assured that Ford understood, the court accepted the pleas of guilty.
On the day of sentencing the state's attorney told the court in chambers he could not in good conscience make the promised recommendation for no further incarceration because Ford had not cooperated with the P.S.I. in that he denied his guilt so that the therapist could not come up with a treatment program. The court said the plea agreement stood as accepted on the *878 record and that the state's promised recommendation of no further incarceration would stand because the defendant had cooperated. No other or different recommendations were made in open court. Ford's attorney did not object nor move for a continuance or plea withdrawal but argued that the conduct to which Ford had pleaded guilty was not criminal and should not be dealt with by incarceration.
The court pronounced judgment of conviction and sentence of two year's probation with the first six months probation spent in jail on each charge. The sentences were ordered to run consecutively.
Six days later, on April 16, 1985, Ford moved to withdraw his plea of guilty under Rule 15.05, Minnesota Rules of Criminal Procedure. The court denied the motion.
The court of appeals reversed the convictions, holding that the trial court did not have facts presented to it sufficient for the criminal activity under Minn.Stat. § 609.43(2), State v. Ford, 377 N.W.2d 62, 68 (Minn.Ct.App.1985). This court granted the state's petition for review.

I.
This case involves a judgment of conviction entered on a plea of guilty to two counts of misconduct of a public officer or employee in violation of Minn.Stat. § 609.43(2). A guilty plea by a counseled defendant has traditionally operated, in Minnesota and in other jurisdictions, as a waiver of all non-jurisdictional defects arising prior to the entry of the plea. State v. Lothenbach, 296 N.W.2d 854, 857 (Minn. 1980). Under this rule a defendant may not enter a conditional plea of guilty which reserves the right to appeal the denial of a motion to suppress evidence or other pretrial order. Id.; Minn.R.Crim.P. 14 comment.
We noted the procedure in Lothenbach by which a defendant wishing to obtain review of pretrial orders might do so without going to trial. The defendant could plead not guilty, stipulate the facts, waive the jury trial and, if there is a finding of guilty, appeal the judgment of conviction. Lothenbach, 296 N.W.2d at 857-58. Although that procedure was not followed in this case, the circumstances are similar to those in Lothenbach. We will do here as we did in Lothenbach and treat this as an appeal from a finding of guilty based on stipulated facts in order to reach the issue decided by the court of appeals which arose from a pretrial, preplea order denying Ford's motion to dismiss.
Did the trial court err in denying the motion to dismiss the charges of misconduct of a public officer or employee for lack of probable cause? The trial court was satisfied that "the Complaint, together with the attached reports, et cetera" did show probable cause to believe that the crimes alleged were committed. The court of appeals reversed the order only insofar as it found probable cause for counts II and VI, charging violations of section 609.43(2). The court of appeals held there were insufficient facts presented to the trial court to support a finding of criminal activity under section 609.43(2). We do not agree.
The legislature has addressed the abuse of power by public officials and employees in the misconduct statute.[2] Section 609.43(2) *879 sets forth the misconduct to which Ford pleaded guilty in counts II and VI:
A public officer or employee who does any of the following, for which no other sentence is specifically provided by law, may be sentenced to imprisonment for not more than one year or to payment of a fine of not more than $3,000, or both:
* * * * * *
(2) In his capacity as such officer or employee, does an act which he knows is in excess of his lawful authority or which he knows he is forbidden by law to do in his official capacity; * * *.
The court of appeals used the proper three-part test in analyzing charges under this statute: (1) whether the act charged was done by a public officer or employee; (2) whether the act was committed while the defendant was acting in his official capacity as a public officer or employee; and (3) whether the act was either forbidden by law or in excess of his lawful authority. State v. Ford, 377 N.W.2d 62, 67 (Minn.Ct.App.1985). Though Ford was unquestionably a public employee as assistant principal and teacher in a public high school, the court of appeals found his conduct to have been done in a private capacity rather than in his official capacity because it consisted of consensual sexual relationships with persons of the age of consent. Id.
Ford raises the same argument here. He does not deny that he is a public employee but argues that the acts, if done, were done in a purely private capacity and were legal because done with persons of the age of consent. We must then determine whether the acts were committed while Ford was acting in his official capacity as a public official or employee.
We have not had section 609.43(2) before us for review. This court, however, has considered the phrase "in his official capacity" in Board of Commissioners v. Dickey, 86 Minn. 331, 334-336, 90 N.W. 775, 776-77 (1902). Dickey was a clerk of court who claimed that he could keep fees he received for certain services which were not enumerated in the statutory schedule of fees for official services of the clerk. He claimed that because those services had not also been enumerated in the statute, he had not performed them "in his official capacity." The court made clear that the statute was not the sole measure of "official capacity" or the limit of legal burdens imposed upon the clerk but that many other duties and responsibilities were imposed by the public interest and the object of the law upon this "responsible public agent" who was "intrusted with the absolute control of records of the highest importance." Id. at 336, 90 N.W. at 777. Thus the statutory phrase "official capacity" refers, as amicus attorney general rightly notes, not only to the express duties set out by statute or rule for a public official but more broadly to all the duties and responsibilities a public official or employee has in serving the public interest in a particular public office. What then is the public interest in the office of public school teacher and administrator? The duties and responsibilities imposed on the responsible public agent who is intrusted with the care and control of children and youth in the years of their greatest learning, growth and development can hardly be less than those imposed on the keepers of "records of the highest importance." Indeed, our society gives teachers great authority and holds them in a position of special trust. The attorney general points to the general control and government of the school given to teachers by Minn.Stat. § 125.02, to the authority given to teachers by Minn.Stat. § 609.06(6) to use reasonable force to restrain or correct children placed in their care; to the responsibility of teachers for reasonable supervision of students, even outside school hours in some circumstances, Verhel v. Independent School District No. 709, 359 N.W.2d 579, 586 (Minn.1984). In addition, the Supreme Court of the United States has recognized that "government has a heightened obligation to safeguard students whom it compels to attend *880 school," New Jersey v. T.L.O., 469 U.S. 325, 353, 105 S.Ct. 733, 750, 83 L.Ed.2d 720 (1985) (Blackmun, J., concurring in the judgment), and has underscored the fact that "teachers have a degree of familiarity with, and authority over, their students that is unparalleled except perhaps in the relationship between parent and child," d. at 348, 105 S.Ct. at 747 (Powell, J., concurring).
In this case Shakopee High School and, by delegation, Ford were responsible for the proper conduct of duly enrolled, minor students. Ford was acting in his official capacity, not as a private individual, because he used his position as teacher, assistant vice principal and speech coach to promote his relationships with female students. He first became acquainted with those students, including J.A.S. and D.B., through the school; he met with them frequently at the school in the privacy of his office where he initiated sexual contact; he gave them privileges such as smoking at the school; he arranged for them to leave school for improper purposes; he used the authority of his position implicitly to persuade them to acquiesce. Consent under these facts and circumstances is irrelevant. Cf. Commonwealth v. Checca, 341 Pa.Super 480, 497, 491 A.2d 1358, 1366 (1985).
Ford contends that even if he committed the acts in his official capacity the state has not proved that the acts were forbidden by law as charged by the complaint. There is no law, he argues, or there was no law at the time he was charged, against sexual acts by people over the age of consent. We set aside, for the moment, the fact that the original complaint, which was the subject of Ford's motion to dismiss, alleged both sodomy in violation of Minn.Stat. § 609.293, subd. 5, and fornication in violation of Minn.Stat. § 609.34, in regard to Ford's conduct with D.B., and the fact that Ford admitted at the time his plea was accepted that he knew the acts to which he pleaded guilty were in excess of his lawful authority or were forbidden by law in his capacity as a school official. We examine the statute. Section 609.43(2) does not require that the act constituting official misconduct be forbidden by a penal statute, only that it be an act "which he knows he is forbidden by law to do in his official capacity." Ford knew that sexual conduct with students by a teacher is forbidden by law because it is grounds for immediate discharge as immoral conduct and conduct unbecoming a teacher under Minn.Stat. § 125.12, subd. 8 (1984). See Downie v. Independent School Dist. No. 141, 367 N.W.2d 913 (Minn.Ct.App.1985). It is the legislative prerogative to attach a criminal penalty to such conduct in section 609.43(2), in addition to an administrative penalty, particularly when, as here, repeated abuse of power and trust by a public official or employee is evinced. Ford's acts as a public school teacher and administrator in giving favors forbidden by school rules to minor female students and obtaining from them consensual sexual contact were acts in excess of his lawful authority or which he knew he was forbidden by law to do in his official capacity within the meaning of section 609.43(2). We so hold. We hold further that the trial court did not err in denying the motion to dismiss the complaint for lack of probable cause.

II.
One issue remains to be determined: whether the trial court erred in denying Ford's motion to withdraw his plea of guilty. The court of appeals, having decided the case on other grounds, did not address this issue. We affirm the decision of the trial court.
Ford's principal defense was that the conduct with which he was charged in the complaint did not constitute the crime of misconduct of a public official or employee under section 609.43(2). When the trial court denied Ford's motion to dismiss the complaint for lack of facts charging an offense and, in addition, ruled admissible Spreigl evidence of similar conduct in two other counties in 1975-76, Ford and his attorney negotiated a plea agreement with the state.
*881 Ford appeared at the time set for trial on January 16, 1985, in Sibley County, to enter a plea pursuant to that agreement. The state's attorney stated the agreement for the record. The defendant would plead guilty to count II, misconduct of a public official or employee, a gross misdemeanor, relative to the juvenile J.A.S., and to count VI, misconduct of a public official or employee, a gross misdemeanor, relative to the juvenile D.B. The defendant would submit a factual basis in which he would admit that he had such sexual contact with each of the individuals and that he, as an assistant principal at the Shakopee High School, provided both with unauthorized absences. The state, for its part, would recommend to the court that the defendant not be further incarcerated if he cooperated fully and completely in the preparation of the P.S.I. and any attendant psychological evaluations and in any recommended therapy and did not make statements in derogation of the witnesses in the case. The state would also dismiss the remaining charges at the time of sentencing. Ford and his attorney both agreed, on being questioned by the court, that the agreement as thus set out by the state's attorney stated the plea agreement in its entirety as they understood it. Ford's attorney said, when asked, that he had advised his client of the court's position that "as far as I'm concerned, nobody bargains the sentence with me; that's the bottom line."
The court accepted Ford's guilty plea to counts II and VI after extended preplea questioning. The court first ascertained that Ford knew there were 12 counts in the complaint, then went through each count separately, reading counts II and VI in detail, because "I want to make sure there is no misunderstanding as to what we are talking about here." The possible sentence to each offense was explained. Ford said he understood that upon a plea of guilty or finding of guilt on each gross misdemeanor, he could be imprisoned not to exceed one year in the county jail or fined $3,000, or both.
The court advised Ford, one by one, of the rights that were his if he stood on his plea of not guilty: trial to a jury of 12 or court trial if preferred; services of his lawyer throughout all proceedings; presumption of innocence; burden on the state to prove every element of the crimes charged beyond a reasonable doubt; right to cross-examine witnesses; to testify or not testify without comment by the prosecutor; unanimous verdict; and help from the state to get his evidence into court. The court ascertained from Ford that no officer or any agent of any branch of government, federal, state or local or any other person had made any promises, threats or inducements, other than the plea agreement already on the record, to lead him to plead guilty to the two charges.
The court offered Ford additional time to talk with his lawyer if what the court had told him had raised questions in his mind. Ford declined the offer and the court accepted his plea of guilty to count II and count VI. He was then sworn and examined by his own attorney. He admitted that in his official capacity as assistant principal of Shakopee Senior High School and assistant speech coach from 1980 through 1984 he developed a personal relationship with students D.B. and J.A.S. He admitted that there was sexual contact with D.B. in 1981 through 1984, and that there was sexual contact with J.A.S. in 1980 and 1981. Ford also admitted that during the course of the school year he allowed D.B. and J.A.S. to have unexcused absences to which, under school rules, they were not entitled during the school day.
Ford denied any claim of innocence with regard to counts II and VI when questioned by the state's attorney, and answered Mr. Tucker's questions thus:
Q. So you are pleading guilty because in Count II you did acts in your capacity as a school official which you knew were in excess of your lawful authority or were forbidden by law to do in that official capacity; is that correct?
A. That's correct, sir.
Q. And the same for Count VI?
A. That's correct, sir.
*882 A P.S.I. and a psychological evaluation were ordered.
Sentencing occurred on April 10, 1985. Prior to sentencing, Ford's attorney, in chambers, told the court he had just learned that the prosecutor was refusing to make the promised recommendation for no incarceration. The state's attorney told the court he could not in good conscience make that recommendation because the state's interest in making the contingent promise in the first place was to ensure that "Mr. Ford was candid in preparing a p.s.i. in doing the evaluation so a viable alternative to incarceration could be obtained" and future vulnerable young victims be protected. In the state's view, Ford had not cooperated but had so denied his guilt that the therapist was unable to come up with a treatment program.
The court indicated that the plea agreement entered into the record at the time the plea was accepted stood, and that the state would recommend that the defendant not be further incarcerated because the defendant had cooperated. In open court, immediately after this discussion, the court asked if the state's attorney had anything he wished to call to the court's attention with regard to sentencing "beyond what has previously been recommended to this court." The state's attorney said, "No, your honor." Ford's attorney did not object but instead indicated, "We are not trying to retract our plea of guilty to two counts, that's in the record." He indicated further that once the court had made its ruling that the statute was applicable to the conduct set out in the complaint, it was in Ford's best interest to plead guilty under the plea agreement rather than to stand trial. He recognized that no plea agreement was binding on the court in the sole function of passing sentence but made a strong plea that Ford be given continued counseling and therapy rather than incarceration.
Only after, six days after, the court had imposed sentences which involved not only the probation for which Ford had hoped but six months jail time, on each charge, did Ford move to withdraw his plea of guilty pursuant to Minn.R.Crim.P. 15.05. Rule 15.05, subd. 1, provides, in relevant part, that "the court shall allow a defendant to withdraw his plea of guilty upon a timely motion and prove to the satisfaction of the court that withdrawal is necessary to correct a manifest injustice." The defendant in this case did not prove to the satisfaction of the trial court, nor has he proved to the satisfaction of this court, that withdrawal of his plea of guilty is necessary to correct a manifest injustice. Ford got what he negotiated for. He was allowed to plead guilty to two charges which involved only sexual contact and, in return, had the other 10 charges dismissed. He did not negotiate with regard to sentence. The trial court made clear, and Ford and his attorney understood, that the court alone would determine the sentence and that the court was not bound by any agreement or any recommendation of the state. The trial court permitted disclosure of the plea agreement pursuant to Minn.R.Crim.P. 15.04, subd. 3(1). Under that rule the court questioned Ford at great length and carefully ascertained that he understood the charges, the possible sentences, the rights that were his if he stood on a plea of not guilty and went to trial and the trial court judge's sole responsibility for the sentence. Only then did the court accept Ford's plea of guilty on the terms of the plea agreement. There was no guarantee by the court that it would follow the state's promised recommendation of no further incarceration. Rather, there was the court's statement to Ford on the record that the court made no promises to defendant and Ford's statement that he understood.
It is clear from the record before us that Ford's plea was not improperly induced by false or broken promises of the prosecutor. See State v. Wolske, 280 Minn. 465, 469, 160 N.W.2d 146, 149 (1968). The recommendation of no further incarceration promised by the state's attorney in this case was conditional, was understood by the defendant not to be binding on the trial court and was, in fact, considered by the trial court. It is clear from the record that *883 Ford, advised by the trial court and his own counsel, pleaded guilty with full knowledge of his rights and the risk of sanction. He took a chance, hoping that the court would not sentence him to further incarceration. An unachieved, unwarranted hope is not the manifest injustice which mandates plea withdrawal here under rule 15.05, subd. 1, any more than it was the basis for plea withdrawal in Schwerm v. State, 288 Minn. 488, 181 N.W.2d 867 (1970). We hold that the trial court did not err in denying the defendant's motion to withdraw his plea of guilty.
The decision of the court of appeals is reversed; the order of the trial court denying the motion to withdraw the plea of guilty is affirmed; the judgment of conviction is reinstated.
NOTES
[1]  August 1, 1984, was the effective date of Minn. Stat. § 609.344(e) extending criminal sexual conduct in the third degree to sexual penetration when

(e) The complainant is at least 16 but less than 18 years of age and the actor is more than 48 months older than the complainant and in a position of authority over the complainant, and uses this authority to cause the complainant to submit. Neither mistake as to the complainant's age nor consent to the act by the complainant is a defense.
and the effective date of Minn.Stat. § 609.345(e) extending criminal sexual conduct in the fourth degree to sexual contact when the same conditions prevail. These statutes did not apply to acts such as Ford's, committed prior to the effective date.
[2]  The statute, in full, reads as follows:

609.43 MISCONDUCT OF PUBLIC OFFICER OR EMPLOYEE
A public officer or employee who does any of the following, for which no other sentence is specifically provided by law, may be sentenced to imprisonment for not more than one year or to payment of a fine of not more than $3,000, or both:
(1) Intentionally fails or refuses to perform a known mandatory, nondiscretionary, ministerial duty of his office or employment within the time or in the manner required by law; or
(2) In his capacity as such officer or employee, does an act which he knows is in excess of his lawful authority or which he knows he is forbidden by law to do in his official capacity; or
(3) Under pretense or color of official authority intentionally and unlawfully injures another in his person, property, or rights; or
(4) In his capacity as such officer or employee, makes a return, certificate, official report, or other like document which to his knowledge is false in any material respect. Minn.Stat. § 609.43 (1984).
