
673 N.E.2d 244 (1996)
174 Ill.2d 320
220 Ill.Dec. 332
The PEOPLE of the State of Illinois, Appellant,
v.
Billie J. EVANS, Appellee.
The PEOPLE of the State of Illinois, Appellant,
v.
Michael MEEKS, Appellee.
Nos. 80158, 80159.
Supreme Court of Illinois.
September 19, 1996.
Rehearing Denied December 2, 1996.
*245 James E. Ryan, Attorney General, Springfield, Charles Garnati, State's Attorney, Marion, and James Creason, State's Attorney, Salem (Barbara Preiner, Solicitor General, Arleen C. Anderson and Paul J. Chevlin, Assistant Attorneys General, Chicago, and Norbert J. Goetten, Stephen E. Norris and Gerry R. Arnold of the Office of the State's Attorneys Appellate Prosecutor, Mt. Vernon, of counsel), for the People.
Daniel M. Kirwan, Deputy Defender, and E. Joyce Randolph, Assistant Defender of the Office of the State Appellate Defender, Mt. Vernon, for appellees.
Chief Justice BILANDIC delivered the opinion of the court:
These two, consolidated appeals concern how Supreme Court Rule 604(d) (145 Ill.2d R. 604(d)) applies to negotiated guilty pleas.

FACTS
In People v. Meeks, the State originally charged defendant Michael Meeks with reckless homicide, robbery, and first degree murder. Meeks' defense counsel and an assistant State's Attorney negotiated a plea agreement. Under its terms, Meeks would plead guilty to the reckless homicide charge; in exchange, the State would (1) move to dismiss the other two charges, (2) dismiss several additional charges pending against Meeks in other cases, and (3) recommend a sentence of 10 years' imprisonment.
On March 11, 1994, the circuit court of Marion County conducted a proceeding attended by Meeks, his defense counsel, and an assistant State's Attorney. Defense counsel orally presented the terms of the negotiated plea agreement to the circuit court. The circuit court then carefully complied with Supreme Court Rule 402 (134 Ill.2d R. 402) by, inter alia, admonishing and examining Meeks, determining that the plea was knowingly and voluntarily made, and determining that a factual basis existed for the plea. Meeks executed a written guilty plea and waiver form, which was presented to the court. At the conclusion of the hearing, the circuit court concurred in the negotiated plea agreement and sentenced Meeks to the recommended sentence of 10 years in prison.
On April 11, 1994, Meeks filed a written pro se motion to reduce his sentence. Subsequently, his defense counsel filed an amended motion requesting that the court reduce Meeks' sentence or, in the alternative, place him in a rehabilitation facility. The circuit court conducted a hearing on the amended motion. Defense counsel explained that the motion did not seek to disturb Meeks' guilty plea; rather, it sought only to reduce the length of Meeks' sentence so that he could begin substance abuse treatment. Because the sentence was the product of a negotiated plea agreement, the circuit court declined to reduce it.
Meeks appealed. The appellate court held that, under Rule 604(d), the circuit court was required to exercise discretion when considering Meeks' motion to reduce his sentence. Consequently, the appellate court reversed and remanded the cause to the circuit court. No. 5-94-0583 (unpublished order under Supreme Court Rule 23). We allowed the State's petition for leave to appeal (155 Ill.2d R. 315; 134 Ill.2d R. 612(b)) and consolidated this case with People v. Evans.
In People v. Evans, the State initially charged defendant Billie J. Evans with residential burglary, armed violence, and aggravated unlawful restraint. Evans' defense counsel and an assistant State's Attorney negotiated a plea agreement. Under its terms, Evans would plead guilty to the armed violence and aggravated unlawful restraint charges; in exchange, the State would (1) move to dismiss the residential burglary *246 charge, and (2) recommend concurrent sentences of 11 and 5 years' imprisonment for the armed violence and aggravated unlawful restraint charges, to be served concurrently with sentences previously imposed in another county.
On February 3, 1992, the circuit court of Williamson County conducted a hearing attended by Evans, his defense counsel, and an assistant State's Attorney. The assistant State's Attorney orally presented the terms of the negotiated plea agreement to the circuit court. The circuit court then carefully complied with Rule 402 by, inter alia, admonishing and examining Evans, determining that the plea was knowingly and voluntarily made, and determining that a factual basis existed for the plea. Evans presented his signed written guilty plea and waiver form to the court. At the conclusion of the hearing, the circuit court concurred in the negotiated plea agreement and sentenced Evans to the recommended prison terms.
A short time later, Evans' defense counsel filed a motion to withdraw Evans' guilty pleas, asserting that Evans did not understand the plea negotiation process. The circuit court denied the motion after a full hearing. Evans appealed. On grounds not relevant here, the appellate court affirmed the convictions, vacated the sentences, and remanded the cause for a new sentencing hearing. Following remand, the circuit court conducted a new sentencing hearing in compliance with the appellate court's order. The circuit court again sentenced Evans according to the terms of the negotiated plea agreement.
Evans' defense counsel next filed a written motion for reconsideration of Evans' sentences. The motion asserted that Evans' sentences are excessive and should be reduced, mainly because he is a young man with mental disabilities. Following a full hearing, the circuit court denied the motion and declined to reduce Evans' sentences. The circuit court determined, for the third time, that Evans should serve the prison sentences to which he had agreed in his plea agreement with the State.
Evans took a second appeal. The appellate court found that Evans' defense counsel failed to file a Rule 604(d) certificate. As a result, the appellate court reversed in part and remanded the cause to the circuit court for a new hearing. No. 5-94-0100 (unpublished order under Supreme Court Rule 23). We allowed the State's petition for leave to appeal (155 Ill.2d R. 315; 134 Ill.2d R. 612(b)) and consolidated this case with Meeks' case.

ANALYSIS
The common issue in these consolidated appeals is how Supreme Court Rule 604(d) applies to negotiated guilty pleas, as opposed to open guilty pleas.
In each of these cases, the defendant and the State entered into a negotiated plea agreement in which the defendant pleaded guilty to certain charges in exchange for the State's agreement to dismiss other charges and recommend a specific sentence. The trial courts accepted the negotiated plea agreements and sentenced the defendants to the recommended prison terms. Following the trial courts' entry of judgment, each defendant then sought to reduce his sentence by filing a motion for sentence reconsideration under Rule 604(d).
The State challenges the defendants' efforts to reduce their sentences. The State contends that it is fundamentally unfair for the defendants to agree to a negotiated plea agreement, obtain the benefits of that bargain (especially the dismissed charges), and then separately seek reconsideration of their negotiated sentences. According to the State, problems concerning plea bargaining arrangements should be addressed using contract law principles. The State claims that, where a defendant pleads guilty in accordance with a negotiated plea agreement, the guilty plea and the sentence "go hand in hand" as material elements of the plea agreement. Consequently, the State maintains, for a defendant to challenge only a sentence imposed as part of a negotiated plea agreement, the defendant should be required to withdraw his guilty plea, thereby returning the parties to the status quo. In this regard, the State asks us to hold that the motion-to-reconsider-sentence *247 provisions of Rule 604(d) do not apply to negotiated guilty pleas.
We agree with the State's argument for several reasons. A review of plea bargaining, guilty pleas, and Rule 604(d) is conducted while we explain the basis for our agreement.

A. Plea Bargaining and Guilty Pleas
Plea bargaining was once a questionable practice, often not acknowledged in open court. See 3 ABA Standards for Criminal Justice § 14-65 (2d ed. 1980) (and authorities cited therein). Since the 1970s, however, the plea bargaining process and the negotiated plea agreements that result have been recognized not only as constitutional, but also as vital to and highly desirable for our criminal justice system. See, e.g., Bordenkircher v. Hayes, 434 U.S. 357, 363-64, 98 S.Ct. 663, 668, 54 L.Ed.2d 604, 611 (1978); Santobello v. New York, 404 U.S. 257, 260-61, 92 S.Ct. 495, 498, 30 L.Ed.2d 427, 432 (1971). Accordingly, this court has stated that "plea bargaining, when properly administered, is to be encouraged." People v. Boyt, 109 Ill.2d 403, 416, 94 Ill.Dec. 438, 488 N.E.2d 264 (1985).
The typical plea bargain contains an agreement by the defendant to plead guilty to a certain charge or charges. In contrast to some past practices, trial courts now accept guilty pleas "only with care and discernment" (Brady v. United States, 397 U.S. 742, 748, 90 S.Ct. 1463, 1468, 25 L.Ed.2d 747, 756 (1970)). See Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969) (holding that due process is violated where a state court accepts a guilty plea in criminal proceedings without an affirmative showing, placed on the record, that the defendant voluntarily and understandingly entered the guilty plea); 134 Ill.2d R. 402 (requiring, among other things, that plea agreements be placed on the record, that certain admonitions be given to the defendant, and that the court determine whether the plea is voluntarily and knowingly made and whether a factual basis exists for the plea). Entering a guilty plea is therefore accurately described as "a grave and solemn act." Brady, 397 U.S. at 748, 90 S.Ct. at 1468, 25 L.Ed.2d at 756. It is not a "temporary and meaningless formality reversible at the defendant's whim." United States v. Barker, 514 F.2d 208, 221 (D.C.Cir.1975); see People v. Hale, 82 Ill.2d 172, 44 Ill.Dec. 501, 411 N.E.2d 867 (1980). Consequently, leave to withdraw a plea of guilty is not granted as a matter of right, but as required to correct a manifest injustice. People v. Hillenbrand, 121 Ill.2d 537, 545, 118 Ill.Dec. 423, 521 N.E.2d 900 (1988); see generally 2 W. LaFave & J. Israel, Criminal Procedure § 20.5(a), at 661 (1984) (providing examples).
Although plea agreements exist in the criminal justice structure, they are governed to some extent by contract law principles. People v. Langston, 125 Ill.App.3d 479, 482, 80 Ill.Dec. 816, 466 N.E.2d 268 (1984). Courts must keep in mind that the defendant's "underlying `contract' right is constitutionally based and therefore reflects concerns that differ fundamentally from and run wider than those of commercial contract law." United States v. Harvey, 791 F.2d 294, 300 (4th Cir.1986), citing Mabry v. Johnson, 467 U.S. 504, 509, 104 S.Ct. 2543, 2547, 81 L.Ed.2d 437, 443-44 (1984) (due process clause implicated where broken government promise that induced guilty plea impaired the voluntariness and intelligence of plea). As a result, the application of contract law principles to plea agreements may require tempering in some instances. Harvey, 791 F.2d at 300; see, e.g., People v. Navarroli, 121 Ill.2d 516, 523, 118 Ill.Dec. 414, 521 N.E.2d 891 (1988) (holding that due process principles may govern the enforceability of plea agreements).
The two cases at bar are appropriate for the application of contract law principles. As earlier noted, in each of these cases, the defendant and the State entered into a negotiated plea agreement in which the defendant pleaded guilty to certain charges in exchange for the State's agreement to dismiss other charges and recommend a specific sentence. The trial courts accepted the plea agreements and entered judgment thereon. Each defendant then unilaterally sought to reduce his sentence by filing a motion for sentence reconsideration. In effect, the defendants are seeking to hold the State to its part of *248 the bargain while unilaterally modifying the sentences to which they had earlier agreed. Such a practice flies in the face of contract law principles. See Harvey, 791 F.2d at 300 ("Neither side should be able, any more than would be private contracting parties, unilaterally to renege or seek modification simply because of uninduced mistake or change of mind"). It is also inconsistent with constitutional concerns of fundamental fairness. See Harvey, 791 F.2d at 300, citing Santobello, 404 U.S. at 261-62, 92 S.Ct. at 498, 30 L.Ed.2d at 432-33. Consequently, the defendants' efforts unilaterally to reduce their sentences while holding the State to its part of the bargain cannot be condoned.
Were we to hold otherwise would be to "encourage gamesmanship of a most offensive nature" (United States ex rel. Williams v. McMann, 436 F.2d 103, 106 (2d Cir.1970)). The accused could negotiate with the State to obtain the best deal possible in modifying or dismissing the most serious charges and obtain a lighter sentence than he would have received had he gone to trial or entered an open guilty plea, and then attempt to get that sentence reduced even further by reneging on the agreement. This would be "nothing more than a `heads-I-win-tails-you-lose' gamble" (McMann, 436 F.2d at 107). See 2 W. LaFave & J. Israel, Criminal Procedure § 20.5(e), at 669-74 (1984). Prosecutors would be discouraged from entering into negotiated plea agreements were such an unfair strategy allowed to succeed. That result certainly would not advance our policy of encouraging properly administered plea bargains.

B. Supreme Court Rule 604(d)
The defendants do not challenge the application of contract law principles to their negotiated plea agreements. Nonetheless, they assert that Rule 604(d)'s plain language authorizes them to file a motion for sentence reconsideration. The State disagrees and asks us to hold that the motion-to-reconsider-sentence provisions of Rule 604(d) apply only to open guilty pleas, as opposed to negotiated guilty pleas.
Rule 604(d) requires certain post-judgment proceedings in the trial court before a defendant who has pled guilty can appeal from the judgment entered upon the guilty plea. It provides in pertinent part:
"No appeal from a judgment entered upon a plea of guilty shall be taken unless the defendant, within 30 days of the date on which sentence is imposed, files in the trial court a motion to reconsider the sentence, if only the sentence is being challenged, or, if the plea is being challenged, a motion to withdraw his plea of guilty and vacate the judgment. The motion shall be in writing and shall state the grounds therefor. * * * The motion shall be heard promptly, and if allowed, the trial court shall modify the sentence or vacate the judgment and permit the defendant to withdraw his plea of guilty and plead anew." (Emphasis added.) 145 Ill.2d R. 604(d) (emphasized language added April 1, 1992, eff. August 1, 1992).
The rule further states that, if the motion is denied, the defendant may appeal. 145 Ill.2d R. 604(d). Any issue not raised in the motion to reconsider or to withdraw the plea shall be deemed waived. 145 Ill.2d R. 604(d).
The main purpose behind the promulgation of Rule 604(d) was to reduce the large number of appeals being taken from guilty pleas. People v. Wilk, 124 Ill.2d 93, 103-04, 106, 124 Ill.Dec. 398, 529 N.E.2d 218 (1988). The rule must be invoked before an appeal can be taken from a guilty plea. Rule 604(d) was designed to give the trial judge who accepted the guilty plea and imposed sentence the opportunity to consider the factual basis upon which the defendant relies to withdraw his guilty plea. A hearing under Rule 604(d) allows a trial court to correct immediately any improper conduct or any errors that may have produced a guilty plea. The rule ensures that fact finding takes place and a record is made at a time when witnesses are still available and memories are fresh. If the motion to withdraw the plea is denied, that decision can be considered on review. If the motion is granted, the need for an appeal has been eliminated. Wilk, 124 Ill.2d at 104, 124 Ill.Dec. 398, 529 N.E.2d 218. Rule 604(d) therefore accomplishes the goal of reducing the number of appeals taken from guilty pleas by requiring post-judgment proceedings *249 in the trial court before an appeal can be taken.
As noted, the State contends that the motion-to-reconsider-sentence provisions of Rule 604(d) (emphasized above) were not intended to apply to negotiated guilty pleas. We agree.
This court previously addressed the application of Rule 604(d) to negotiated guilty pleas in People v. Stacey, 68 Ill.2d 261, 12 Ill.Dec. 240, 369 N.E.2d 1254 (1977). At the time Stacey was decided, Rule 604(d) provided in relevant part:
"`No appeal from a judgment entered upon a plea of guilty shall be taken unless the defendant, within 30 days of the date on which sentence is imposed, files in the trial court a motion to withdraw his plea of guilty and vacate the judgment.'" Stacey, 68 Ill.2d at 264, 12 Ill.Dec. 240, 369 N.E.2d 1254, quoting 58 Ill.2d R. 604(d).
This version of Rule 604(d) thus differs from the current version in that a defendant could never appeal from a guilty plea unless the defendant first moved in the trial court to withdraw the guilty plea and vacate the judgment. The defendants in Stacey claimed that they should not be required to move to withdraw their guilty pleas because they wished to appeal only their sentences. This court disagreed and held that Rule 604(d) applies to all guilty pleas, thereby including both negotiated guilty pleas and open guilty pleas. Stacey, 68 Ill.2d at 266, 12 Ill.Dec. 240, 369 N.E.2d 1254. The Stacey court explained:
"In entering into the plea agreement, the defendants recognized that in consideration of the State's dismissal or modification of charges, they would plead guilty to a certain specific charge or charges and accept what punishment the court might impose. The State also agreed to the dismissal or modification of charges. It was a bargain into which the People and the defendants freely entered. The defendants and the State are equally bound to adhere to this agreement. To permit a defendant to appeal only the sentence without removing the plea would vitiate the agreement he entered into with the State." (Emphasis added.) Stacey, 68 Ill.2d at 265, 12 Ill.Dec. 240, 369 N.E.2d 1254.
The Stacey court therefore ruled that a defendant could not appeal from a guilty plea unless he first moved in the trial court to withdraw the guilty plea and vacate the judgment, even if he sought to challenge only his sentence.
In People v. Wilk, 124 Ill.2d 93, 124 Ill. Dec. 398, 529 N.E.2d 218 (1988), this court overruled Stacey's interpretation of Rule 604(d) where open guilty pleas are involved. The same version of Rule 604(d) involved in Stacey was in effect for Wilk. Wilk addressed the consolidated appeals of four defendants. The portion of Wilk which concerns us here is illustrated by defendant Danny Brown's case. See Wilk, 124 Ill.2d at 101-02, 124 Ill.Dec. 398, 529 N.E.2d 218. Brown pleaded guilty to aggravated battery of a child and was sentenced to seven years in prison. He timely filed a motion to reconsider his sentence, asserting that the sentence was excessive. Brown did not file a motion to withdraw his guilty plea and vacate the judgment in the trial court pursuant to Rule 604(d). The trial court denied the motion to reconsider. The appellate court followed Stacey and dismissed Brown's appeal because he had not filed a motion to withdraw his guilty plea and vacate the judgment. This court reversed and remanded Brown's case to the appellate court for a review of his sentence. Wilk, 124 Ill.2d at 110, 124 Ill.Dec. 398, 529 N.E.2d 218. This court held that Brown was not required to file a motion to withdraw his guilty plea and vacate the judgment, because he was not challenging his guilty plea. See Wilk, 124 Ill.2d at 109-10, 124 Ill.Dec. 398, 529 N.E.2d 218. In other words, the Wilk court allowed Brown to challenge only his sentence by filing a motion to reconsider the sentence.
This aspect of Wilk was reaffirmed in People v. Wallace, 143 Ill.2d 59, 155 Ill.Dec. 821, 570 N.E.2d 334 (1991). Following Wilk and Wallace, Rule 604(d) was amended to reflect Wilk's holdings. The present version of Rule 604(d), quoted in relevant part above, now contains the language allowing the filing of a motion to reconsider the sentence where only the sentence is being challenged.
*250 As previously discussed, in each of the cases involved here, the defendants filed only motions to reconsider their sentences, which were negotiated as part of a plea agreement. The defendants assert that Wilk, Wallace, and the present version of Rule 604(d) clearly permit all defendants who enter guilty pleas to file only a motion for sentence reconsideration. In contrast, the State maintains that Rule 604(d)'s motion-for-sentence-reconsideration provisions were intended to apply only to open guilty pleas. Since Wallace and the amendment to Rule 604(d), our appellate court has expressed conflicting views on this issue. Compare People v. Goodbrake, 255 Ill.App.3d 833, 837, 194 Ill.Dec. 442, 627 N.E.2d 779 (1994), with People v. Soles, 226 Ill.App.3d 944, 168 Ill.Dec. 782, 590 N.E.2d 104 (1992).
We agree with the State's position. Our review of Wilk and Wallace reveals that the pleas involved in those cases were open guilty pleas. In other words, the defendants pled guilty without receiving any promises from the State in return. Following a defendant's open guilty plea, the trial court exercises its discretion and determines the sentence to be imposed. Both good public policy and common sense dictate that defendants who enter open guilty pleas be allowed to challenge only their sentences without being required to withdraw their guilty pleas. See Wilk, 124 Ill.2d 93, 124 Ill.Dec. 398, 529 N.E.2d 218; Wallace, 143 Ill.2d 59, 155 Ill. Dec. 821, 570 N.E.2d 334. Wilk thus overruled Stacey where open guilty pleas are concerned.
The reasoning utilized by this court in Wilk, however, does not apply to negotiated guilty plea agreements. We agree with the State that, under these circumstances, the guilty plea and the sentence "go hand in hand" as material elements of the plea bargain. To permit a defendant to challenge his sentence without moving to withdraw the guilty plea in these instances would vitiate the negotiated plea agreement he entered into with the State. We therefore hold that, following the entry of judgment on a negotiated guilty plea, even if a defendant wants to challenge only his sentence, he must move to withdraw the guilty plea and vacate the judgment so that, in the event the motion is granted, the parties are returned to the status quo. Stacey, 68 Ill.2d at 265, 12 Ill.Dec. 240, 369 N.E.2d 1254; People v. Goodbrake, 255 Ill.App.3d 833, 837, 194 Ill.Dec. 442, 627 N.E.2d 779 (1994). Consequently, the motion-to-reconsider-sentence provisions of Rule 604(d) apply only to open guilty pleas.
In summary, for a defendant to prevail in a challenge to a sentence entered pursuant to a negotiated plea agreement, the defendant must (1) move to withdraw the guilty plea and vacate the judgment, and (2) show that the granting of the motion is necessary to correct a manifest injustice.

C.
The cases at bar remain to be resolved. In the case of defendant Michael Meeks, Meeks and the State entered into a negotiated plea agreement. Under its terms, Meeks pleaded guilty to the charge of reckless homicide and, in exchange, the State dismissed five other charges pending against him and recommended a specific sentence. The circuit court accepted the plea agreement and entered judgment in accordance with its terms. Subsequently, Meeks filed a written pro se motion to reduce his sentence. His defense counsel then filed an amended motion requesting that the court reduce Meeks' sentence. Because the sentence was the product of a negotiated plea agreement, the circuit court declined to reduce it. On appeal, the appellate court reversed and remanded, directing the circuit court to exercise its discretion to determine whether Meeks' sentence should be reduced.
The appellate court was incorrect. There was no error in the circuit court proceeding. The circuit court correctly ruled that Meeks was not entitled to a reduction of his negotiated sentence because it had been bargained for in his plea agreement. As explained above, Meeks could obtain relief only by moving to withdraw his guilty plea and vacate the judgment. He would also have to show that the granting of the motion is necessary to correct a manifest injustice. He did neither. As a result, Meeks is not entitled to a reduction of his negotiated sentence. *251 The circuit court's judgment is affirmed. The appellate court's judgment is reversed.
In the case of defendant Billie J. Evans, Evans and the State entered into a negotiated plea agreement. Pursuant to its terms, Evans pleaded guilty to two charges and, in exchange, the State dropped a third charge and recommended specific sentences. The circuit court accepted the plea agreement and entered judgment in accordance with its terms. Subsequently, Evans' defense counsel filed a motion for sentence reconsideration asserting that Evans' sentences are excessive. The circuit court declined to reduce Evans' sentences. The circuit court held that Evans should serve the sentences to which he agreed under the terms of the negotiated plea agreement. On appeal, the appellate court reversed and remanded for a new sentencing hearing because counsel failed to file a Rule 604(d) certificate.
The appellate court was mistaken. The circuit court's ruling was correct. As the circuit court explained, Evans was not entitled to a reduction of his negotiated sentences because they had been bargained for in his plea agreement. Evans could obtain relief only by moving to withdraw his guilty pleas and vacate the judgment. He would also have to show that the granting of the motion is necessary to correct a manifest injustice. He did neither. Consequently, Evans is not entitled to a reduction of his negotiated sentences. The circuit court's judgment is therefore affirmed. The appellate court's judgment is reversed.

CONCLUSION
In the case of Michael Meeks, the appellate court's judgment is reversed, and the circuit court's judgment is affirmed. In the case of Billie J. Evans, the appellate court's judgment is reversed, and the circuit court's judgment is affirmed.
No. 80158Appellate court judgment reversed; circuit court judgment affirmed.
No. 80159Appellate court judgment reversed; circuit court judgment affirmed.
