
    Arturo G. GONZALEZ, Appellant, v. The STATE of Florida, Appellee.
    No. 3D99-2064.
    District Court of Appeal of Florida, Third District.
    June 20, 2001.
    Arturo G. Gonzalez, in proper person.
    Robert A. Butterworth, Attorney General, and Mark Rosenblatt, Assistant Attorney General, for appellee.
    Before COPE, FLETCHER and RAMIREZ, JJ.
   On Rehearing Denied

COPE, J.

On consideration of appellant’s motion for rehearing, the court withdraws the opinion dated October 25, 2000, and substitutes the following opinion:

Arturo G. Gonzalez appeals an order denying his motion to correct illegal sentence. We affirm.

In 1994, defendant-appellant Gonzalez entered a guilty plea to one count of attempted first degree felony murder and three counts of aggravated child abuse, with the length of sentence to be decided by the court. The court sentenced defendant to thirty years of imprisonment on the attempted first degree felony murder count and fifteen years consecutive on one of the child abuse counts, for a total of forty-five years. Concurrent sentences were imposed on the remaining counts.

In 1995, the Florida Supreme Court decided State v. Gray, 654 So.2d 552 (Fla.1995), which abolished the offense of attempted first degree felony murder and held that the decision would apply to cases pending on direct review or not yet final. See id. at 554.

In 1996, defendant was granted a belated appeal. His appointed counsel raised several sentencing issues but did not challenge the legality of the conviction for attempted first degree felony murder. Defendant concedes that this was because “appellate counsel advised the defendant not to raise that issue, because it would have placed the defendant’s plea in jeopardy and subject to a higher sentence than that already imposed.” The State had nolle prossed a kidnapping count as part of the plea agreement, which the State could reinstate if the plea were set aside, and the defendant potentially was subject to more consecutive sentencing than that which the trial court had imposed. If the plea were set aside the State may also have been able to amend the information to charge the offense of attempted premeditated murder, instead of attempted first degree felony murder.

This court affirmed the defendant’s sentences. See Gonzalez v. State, 683 So.2d 676 (Fla. 3d DCA 1996). Defendant filed two subsequent postconviction motions, neither of which raised the Gray issue.

In 1999, defendant challenged his attempted first degree felony murder conviction, contending that it is illegal under Gray. The trial court denied the defendant’s motion, and this appeal follows.

Plea agreements are governed by contract principles. See Garcia v. State, 722 So.2d 905, 907 (Fla. 3d DCA 1998), review dismissed, 727 So.2d 905 (Fla.1999); State v. Frazier, 697 So.2d 944, 945 (Fla. 3d DCA 1997). Defendant entered into his plea agreement one year prior to the Gray decision. At that time attempted first degree felony murder was a recognized offense. See State v. Woodley, 695 So.2d 297, 298 (Fla.1997). As part of the plea agreement, the State nolle prossed the kidnapping charge. The defendant accepted the benefit of the plea agreement. During the belated appeal, defendant accepted his counsel’s advice that it would be in his best interest to forego making a Gray challenge. Having accepted the benefit of the bargain and having waived the Gray issue, the plea agreement cannot be reopened now.

Affirmed. 
      
      . Although not applicable to this case, the legislature subsequently reenacted the offense of attempted felony murder. See § 782.051, Fla. Slat. (1999); Brown v. State, 761 So.2d 1135 (Fla. 1st DCA 2000), approved, 781 So.2d 1083 (Fla.2001).
     
      
      . The briefs confirm this. The State pointed out in its brief that defendant had not made a Gray challenge, thereby retaining the benefit of his plea. Counsel for defendant filed a reply brief on other matters, but did not take issue with the statement that defendant had chosen not to raise a Gray challenge.
     