
737 So.2d 1165 (1999)
Rodolfo ZAMORA, Appellant,
v.
STATE of Florida, Appellee.
No. 98-00062.
District Court of Appeal of Florida, Second District.
July 2, 1999.
James Marion Moorman, Public Defender, and Joan Fowler, Assistant Public Defender, Bartow, for Appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Dale E. Tarpley, Assistant Attorney General, Tampa, for Appellee.
WHATLEY, Acting Chief Judge.
In this appeal of his sentence, Rodolfo Zamora contends that his double jeopardy rights were violated when the trial court allowed the State to withdraw its plea offer after the court had accepted his plea and pronounced sentence. We reverse.
Zamora had been charged with violating his probation. Pursuant to a plea agreement between the State and defense, Zamora admitted his violation in exchange for a twelve-year prison sentence. The trial court conducted an appropriate plea colloquy and concluded by stating: "Accept his admission. Find that it's freely and voluntarily entered. Revoke and adjudicate. Sentence him to 12 years Florida State Prison and give him credit for whatever time he served. You have 30 days in which to appeal the judgment and sentence of the Court."
After this pronouncement, defense counsel cited the prison credit to which Zamora would be entitled. The State then asserted it would not have made the offer had it *1166 known the amount of credit for time served that Zamora would receive. After noting that it did not think defense counsel had been trying to mislead anyone, the trial court allowed the State to set aside the offer on the ground that it had been based upon a mistake. Over defense counsel's objection, the trial court sentenced Zamora to fifteen years in prison with credit for time served.
The trial court erred in allowing the State to withdraw its plea offer because jeopardy attaches once a trial court accepts a defendant's plea. See Brown v. State, 367 So.2d 616, 620-621 (Fla.1979) (guilty plea); Jupin v. State, 664 So.2d 1031 (Fla. 2d DCA 1995) (nolo contendere plea). See also State ex rel. Wilhoit v. Wells, 356 So.2d 817, 822 (Fla. 1st DCA 1978) ("[T]he court cannot accept such a plea [of guilty or nolo contendere], thus binding the accused, and then reject the plea over the defendant's objection, either as a matter of discretion or on some ground insufficient for the rejection of a guilty plea that has been accepted."). After acceptance of a plea, the trial court may not set aside that plea without legal cause. Jupin, 664 So.2d at 1032. The State's failure to properly investigate the issue of the amount of credit to which Zamora would be entitled does not constitute legal cause. Furthermore, it is not incumbent upon defense counsel to provide the State with this information. If the State were uncertain, an inquiry could have been made before the plea offer was made.
The State's reliance on Farber v. State, 409 So.2d 71 (Fla. 3d DCA 1982), is misplaced because there is no indication that case involved the acceptance of a plea, at which point jeopardy attaches.
Accordingly, we reverse Zamora's sentence and remand with directions that the trial court resentence Zamora in accordance with the accepted plea to twelve years with credit for time served.
Reversed and remanded for resentencing.
NORTHCUTT and DAVIS, JJ., Concur.
