
898 So.2d 997 (2005)
Weston COLEMAN, Appellant,
v.
STATE of Florida, Appellee.
No. 2D04-4313.
District Court of Appeal of Florida, Second District.
March 4, 2005.
Weston Coleman, pro se.
Charles J. Crist, Jr., Attorney General, Tallahassee, and Ronald Napolitano, Assistant Attorney General, Tampa, for Appellee.
SALCINES, Judge.
Weston Coleman appeals the trial court's summary denial of his motion for postconviction relief filed pursuant to Florida Rule of Criminal Procedure 3.800(a). We reverse the order of the trial court and remand with directions for the trial court to vacate the sentences and to resentence Coleman.
Coleman entered guilty pleas in two cases to sale and possession of cocaine and failure to appear in exchange for a cap of sixteen years for any sentence imposed. On December 3, 2002, the trial court convicted him of and sentenced him for the offenses. In his motion to correct illegal sentence, Coleman asserts that there is a fundamental sentencing error in the judge's oral pronouncement of his sentence for possession of cocaine, a second-degree felony. The written sentencing documents show that the trial court sentenced him to sixteen years' prison, suspended after ten years and followed by six years' probation on the sale of cocaine, five years' prison on the possession of cocaine, and ten years' prison on the failure to appear as a habitual offender, all concurrent. The written documents do not indicate that the trial court imposed a habitual felony offender sentence for the sale of cocaine. However, the sentencing transcript shows that the trial court summarized the State's required proof for habitual felony offender sentencing and declared that the habitual felony offender sentence applied to all three convictions. It appears that the trial court misstated the sentence for the sale of cocaine by pronouncing "on the second-degree felony possession of cocaine, I'm *998 imposing 16 years with the last six suspended."
The State acknowledged in the response ordered by this court that possession of cocaine was not subject to habitual felony offender sentencing. See § 775.084(1)(a)(3), Fla. Stat. (1999). It further responded that the trial court obviously intended to sentence the appellant as a habitual offender to sixteen years' prison for the sale of cocaine conviction. See O'Neal v. State, 862 So.2d 91, 92 (Fla. 2d DCA 2003).
The trial court's clear intent was to impose the sixteen-year sentence for sale of cocaine, the only second-degree felony conviction. Because a discrepancy exists between the written order and the oral pronouncement of sentence, the trial court must resentence Coleman. Generally, when the trial court's written order is inconsistent with its oral pronouncement, the oral pronouncement prevails. Cunningham v. State, 818 So.2d 685, 686 (Fla. 2d DCA 2002). However, when the State does not concede that the written order is in error, as in the present case, remand is appropriate for the trial court to make a factual determination to resolve the conflict between the written order and the oral pronouncement. Id.
Accordingly, we reverse the order of the trial court with regard to the sentences imposed with directions for the trial court to vacate those sentences and to resentence Coleman.
Reversed and remanded with directions.
NORTHCUTT and CASANUEVA, JJ., Concur.
