
130 Ill. App.2d 588 (1970)
264 N.E.2d 423
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
TERRENCE J. BARON, Defendant-Appellant.
No. 70-33.
Illinois Appellate Court  Second District.
November 25, 1970.
*589 John J. Wallace, of Wallace, Shelton, Kleinman, Belline, Kalcheim & Curoe, of Chicago, for appellant.
James Boyle, State's Attorney, of Sycamore, (Charles Marshall, Assistant State's Attorney, of counsel,) for the People.
Reversed and remanded.
Mr. PRESIDING JUSTICE DAVIS delivered the oinion of the court:
The defendant, Terrence J. Baron, was indicted for the illegal sale of hallucinogenic drugs, in violation of section 802(b) of Chapter 111 1/2 of Illinois Revised Statutes of 1969. The indictment charged that the defendant sold 220 LSD tablets on May 27, 1969, and the indictment bore number F69-41. This was a second offense and was therefore classified as a felony. The first offense against the defendant was charged in a complaint which was then pending before the same court. It bore case number M69-590, and was classified as a misdemeanor. (See: Ill. Rev. Stat. 1969, ch. 111 1/2, par. 804.) A further and unrelated misdemeanor charge was pending against the defendant which bore number M69-591.
The defendant pled guilty to charges M69-590 and F69-41, and the State then filed a nolle prosequi to case number M69-591. The case numbered F69-41 was then set for hearing on an application for probation and for hearing in aggravation and mitigation. The court ordered the probation officer to make an investigation and report back within two weeks.
At this point in the proceeding, it was made known to the court that the guilty pleas in cases F69-41 and M69-590 had both been obtained upon a promise of probation. When it became apparent that the court was not going to be governed by the negotiated plea agreement, the defendant's counsel immediately asked that the pleas of guilty be withdrawn in cases F69-41 and M69-590, and that the nolle prosequi, which had been entered in case M69-591, be withdrawn and the case reinstated, thus placing everything in the proceedings back at its initial status. The court denied the motion and granted probation for a period of three years, conditioned upon the first nine months thereof being served in the Illinois State Prison Farm at Vandalia.
*590 The defendant filed an extensive motion for new trial, which was denied, and he has appealed. He contends, among things, that the trial court erred in refusing to permit him to withdraw his pleas of guilty. We believe that the defendant is correct in this contention.
The defendant obviously agreed to plead guilty upon the misapprehension that he would receive an unconditional probation on the felony charge of selling hallucinogenic drugs. The record permits no other conclusion. The court would not accede to such agreement, and conditioned the defendant's probation upon the first nine months thereof being served in the Illinois State Prison Farm at Vandalia.
In People v. Riebe (1969), 40 Ill.2d 565, the court, at page 568, summarized the oft-repeated principles applicable to permitting the withdrawal of a plea of guilty, in these words:
"The discretion of the trial court to permit the withdrawal of the plea of guilty is a judicial discretion which should always be exercised in favor of innocence and liberty. The law favors a trial upon the merits by jury, and all courts should so administer the law and construe the rules of practice as to secure a hearing upon the merits, if possible. The least surprise or influence causing a defendant to plead guilty when he has any defense at all should be sufficient cause to permit a change of the plea from guilty to not guilty. The withdrawal of the plea of guilty should not be denied in any case where it is evident that the ends of justice will be served by permitting the plea of not guilty in its stead."
The Advisory Committee on the Criminal Trial of the American Bar Association Project on Minimum Standards for Criminal Justice with reference to Pleas of Guilty, recommends in Part II, Section 2.1, (a) (ii) (4), relating to the withdrawal of a guilty plea, that the court should allow a defendant to withdraw a guilty plea if the defendant proves that "he did not receive the charge or sentence concessions contemplated by the plea agreement and the prosecuting attorney failed to seek or not to oppose these concessions as promised in the plea agreement." See People v. Walston (1967), 38 Ill.2d 39, 43, 44.
 1 We are compelled to the conclusion that the trial judge knew of the negotiations that preceded the plea of guilty in cases numbered F69-41 and M69-590. While that judge was not the judge who entered the subsequent orders, this circumstance does not alter our view that the ends of justice require that the defendant be permitted to withdraw his plea of guilty in cases numbered M69-590 and F69-41, and to substitute in lieu thereof, pleas of not guilty. We note that as to the other misdemeanor case numbered M69-591, a nolle prosequi was entered at the time the guilty pleas were entered. The record and appellant's brief indicate *591 that this nolle prosequi was a part of the same plea agreement. Consequently, the defendant must agree to the reinstatement of that case, subject to his right to change his pleas, if he is to be permitted to alter his pleas in cases F69-41 and M69-590.
If such concession is not forthcoming, the judgment herein is to be affirmed; if such concession is made, then the judgment of the trial court is reversed and the cause is remanded for further proceedings not inconsistent with this opinion.
The trial judge who entered the judgment appealed from herein evidently became confused with reference to the number, charge, plea, and status of each of the three cases which were pending against the defendant. Under such circumstances, he entered an order that the felony case against the defendant, numbered F69-41 be designated a misdemeanor. Such order was beyond his power. It is the duty of the State's Attorney in misdemeanor cases, and the State's Attorney or Grand Jury in felony cases, to determine the charge which will be placed against a person.
Section 5 of chapter 14 of Illinois Revised Statutes of 1969 provides that it is the duty of the State's Attorney to commence and prosecute all criminal actions, suits and indictments. Article III of the Illinois Constitution divides the powers of the government among the legislative, executive and judicial departments, and provides that neither of these departments shall exercise powers belonging to either of the other departments.
 2, 4 The State's Attorney's office is a part of the executive branch of the government, and the powers exercised by that office are executive powers. A judge or court cannot exercise the powers of the executive branch of our government. (People ex rel. Elliott v. Covelli (1953), 415 Ill. 79, 88, 89.) Thus, the court erred in designating the felony charge as a misdemeanor and in treating it as such. This order was void as a judicial encroachment upon the executive power of the State's Attorney.
The other matters raised by the defendant need not be discussed in view of the position we have taken herein. Accordingly, the judgment is reversed and remanded, subject to the conditions enumerated in the opinion.
Judgment reversed and remanded.
MORAN and SEIDENFELD, JJ., concur.
