
978 So.2d 284 (2008)
Teddrick MORRISON, Appellant,
v.
STATE of Florida, Appellee.
No. 4D07-4936.
District Court of Appeal of Florida, Fourth District.
April 16, 2008.
*285 Teddrick Morrison, Trenton, pro se.
Bill McCollum, Attorney General, Tallahassee, and Diane F. Medley, Assistant Attorney General, West Palm Beach, for appellee.
PER CURIAM.
The defendant appeals the summary denial of his rule 3.800(a) motion to correct illegal sentence. We reverse.
The defendant alleged that he was illegally sentenced to six years in prison in connection with three 2004 cases after violating community control. He argues that, pursuant to sections 958.04(2)(b) and 958.045(5)(c), Florida Statutes (2004), the court was limited to sentencing him to no more than 364 days because he had successfully completed boot camp. He cited a number of cases, including Thomas v. State, 825 So.2d 1032 (Fla. 1st DCA 2002), in which the court held that if a youthful offender successfully completes boot camp and then violates probation, the trial court may impose a term of incarceration that does not exceed 364 days. See §§ 958.04(2)(b), 958.045(5)(c), Fla. Stat. (2004).
The trial court summarily denied the motion without explanation. The defendant appealed.
The State argues that the trial court correctly applied an amendment to section 958.045, which became effective on July 1, 2006. That section now provides that a youthful offender, who violates probation following successful completion of the boot camp program, may be sentenced to any sentence that could have been imposed originally. See Ch. 2006-270, § 1, at 2841-42, Laws of Fla.
The offenses for which the defendant was sentenced were committed prior to the effective date of the amendment. To apply the 2006 amendment to those offenses would violate the constitutional prohibition against ex post facto laws. Art. I, § 10, Fla. Const. ("No bill of attainder, ex post facto law or law impairing the obligation of contracts shall be passed."). "The Ex Post Facto Clause is triggered when a law `increases punishment beyond what was prescribed when the crime was consummated.'" Meola v. Dep't of Corr., 732 So.2d 1029, 1032 (Fla.1998) (quoting Lynce v. Mathis, 519 U.S. 433, 441, 117 S.Ct. 891, 137 L.Ed.2d 63 (1997)) (italicized emphasis added in Meola).
When the defendant's offenses were committed, a violation of probation could result in a sentence no longer than 364 days. Compare Windom v. State, 835 So.2d 1174 (Fla. 5th DCA 2002). Accordingly, *286 we reverse and remand for further proceedings.
Reversed and Remanded.
STEVENSON, TAYLOR and MAY, JJ., concur.
