
800 N.E.2d 658 (2003)
Marlon SHEPPERSON, Appellant-Defendant,
v.
STATE of Indiana, Appellee.
No. 48A05-0303-CR-129.
Court of Appeals of Indiana.
December 22, 2003.
John T. Wilson, Anderson, IN, Attorney for Appellant.
Steve Carter, Attorney General of Indiana, Zachary J. Stock, Deputy Attorney General, Indianapolis, IN, Attorneys for Appellee.

OPINION
SULLIVAN, Judge.
Marlon Shepperson appeals from the trial court's order sentencing him to serve three years incarceration following the submission of an oral guilty plea to the court. The issue he presents for our review is whether the sentence imposed by the trial court was in accordance with the terms of the plea agreement accepted by the trial court.
We reverse.
Shepperson was charged under two cause numbers for several different *659 crimes. On February 3, 2002, Shepperson appeared before the trial court for the purpose of entering a guilty plea under both cause numbers. No written plea was entered, but Shepperson's counsel stated that she and the prosecutor came to an agreement on a plea proposal. She then stated the plea agreement for the record. According to the agreement, Shepperson was to plead guilty to one charge for each cause and the remaining charges would be dropped.[1] She then stated that Shepperson would receive a two-year sentence with the terms to be left up to the court. Upon questioning by the trial court, counsel explained that the sentences upon the two counts were to be served concurrently as a two-year sentence. The trial court then accepted the plea. However, at the sentencing hearing, the trial court sentenced Shepperson to a total of three years, one year for possession of marijuana to be served consecutive to a two-year sentence for possession of a controlled substance.[2]
A plea agreement is contractual in nature. Rogers v. State, 715 N.E.2d 428, 428 (Ind.Ct.App.1999). It is within the trial court's discretion to accept or reject a plea agreement and the sentencing provisions therein, but once the court accepts the agreement, the court is bound by its terms and may impose only the sentence required by the plea agreement. Id. at 429.
Shepperson claims that the trial court erred in ordering that the total sentence be three years. He asserts that once the trial court accepted the plea that it was bound by the terms as enunciated by his counselfor a maximum of two years in the aggregate. Further, he claims that because the prosecutor did not object to the terms at the guilty plea hearing, the State has waived any challenge to the terms. The State replies that Shepperson has failed to sustain his burden in proving that the trial court must enforce the oral plea agreement.
Indiana Code § 35-35-3-3 (Burns Code Ed. Repl.1998) requires that a prosecutor submit a plea agreement on a felony charge[3] in writing to the trial court. Based upon this statutory requirement, several cases have stated that oral plea agreements not reduced to writing need not be specifically enforced. E.g., Parker v. State, 542 N.E.2d 1026, 1029 (Ind.Ct. App.1989). However, our Supreme Court has recognized that in some situations, oral plea agreements must be enforced. In Badger v. State, 637 N.E.2d 800, 804 (Ind. 1994), in summarizing prior case law which required trial courts to enforce oral plea agreements, our Supreme Court stated, "The lesson of Bowers [v. State, 500 N.E.2d 203 (Ind.1986) ] and Petty [v. State, 532 N.E.2d 610 (Ind.1989), overruled on other grounds by Whedon v. State, 765 N.E.2d 1276 (Ind.2002)] is that courts *660 must enforce agreements between the prosecution and a defendant, even if those agreements are oral and therefore outside the statutory framework, either if the State has materially benefitted from the terms of the agreement or if the defendant has relied on the terms of the agreement to his substantial detriment." The State, relying upon Badger and the cases cited therein, asserts that Shepperson has wholly failed to show that either the State materially benefited from the terms of the plea agreement or that he relied upon the terms of the plea agreement to his substantial detriment. However, a careful reading of Badger, Bowers, and Petty reveals that the State's reliance upon them is misplaced.
The common thread throughout those three cases is that no plea agreement had been accepted by the trial court. Rather, in those cases, a defendant was attempting to get the trial court to enforce a plea agreement which had not been before the court. This case is substantially different. Here, the terms of the agreement were made known to the trial court on the record and they were accepted by the trial court. This distinction in fact makes the cases relied upon by the State irrelevant to the resolution of this appeal except to the extent that an oral plea agreement should be enforced if one of the two factors enumerated in Badger have been met.
In Rogers, supra, this court was called upon to review a fact situation nearly identical to that at issue here. There, the terms of the plea agreement were orally presented to the trial court by the defendant's counsel. Defense counsel stated that the sentences were to run concurrent for the burglary and sexual battery charges, with sentencing left up to the trial court. The trial court ordered that the sentences for the two battery charges were to be served consecutive to one another, as were the sentences for the sexual battery charge. This court, noting that the trial court had accepted the plea, held that the trial court was bound by the terms of the agreement and that the agreement required that the sentences for all the burglary and sexual battery counts be served concurrent to one another. Rogers, 715 N.E.2d at 430; see also I.C. § 35-35-3-3(e) (stating that if a trial court accepts a plea agreement, it is bound by its terms). This court then remanded the cause to the trial court for resentencing in accordance with the plea agreement. Rogers, 715 N.E.2d at 430.
Applying the facts of this case to the holding of Rogers, we conclude that the trial court erred in ordering that the sentences be served consecutively. No matter what length of incarceration the court chose to sentence Shepperson to for the misdemeanor, the total maximum sentence that Shepperson could serve was two years, which his counsel stated he was to receive for the felony. Therefore, while the trial court could order Shepperson to serve one year for possession of marijuana and two years for possession of a controlled substance, the sentences must be concurrent.[4]
We reverse Shepperson's sentence and remand for resentencing in accordance with this decision.
FRIEDLANDER, J., and RILEY, J., concur.
NOTES
[1]  An error worthy of note is that Shepperson's counsel stated that Shepperson would plead guilty to possession of marijuana as a Class D felony and possession of a controlled substance as a Class D felony. For the possession of marijuana, Shepperson was charged with a Class A misdemeanor. Apparently the trial court realized that counsel's statement was in error because the abstract of judgment reveals that Shepperson was guilty of possession of marijuana as a Class A misdemeanor. No appeal was made from that error, and it has no effect upon the resolution of the sentencing issue. However, we address the issue because it highlights the need for plea agreements to be in writing to avoid such errors.
[2]  The sentencing recommendation by the Probation Department was for a one-year sentence on each count to be consecutive for an aggregate sentence of two years.
[3]  Although one of the charged crimes was a misdemeanor, the other was a felony and on this basis we hold the statute to be applicable.
[4]  We are not persuaded by the State's claim that the prosecutor never agreed that the sentences were to be concurrent. In this regard, we agree with Shepperson in his contention that by failing to object to the terms as stated by defense counsel at the guilty plea hearing before they were accepted by the trial court, the State cannot challenge them later.
