Appellant seeks reversal of an order denying a Florida Rule of Criminal Procedure 3.850 motion for post-conviction relief alleging, inter alia: (1) his guilty plea to armed robbery did not include a plea to possession of a firearm while engaged in a criminal offense; (2) it was error to impose costs against him after the sentencing hearing without notice or an opportunity to object. Both points have merit.
The State concedes that the defendant did not agree to a conviction on the firearm possession charge because the State agreed to abandon that charge as part of a negotiated plea to the armed robbery charge. There should have been a confession of reversible error on this point. A conviction and sentence on a felony charge which has been withdrawn by the State is not harmless error.
The State’s response to the defendant’s second point — that the issue of an ability to pay does not arise until the State seeks enforcement — completely misses the issue. Due process requires notice and an opportunity to be heard before costs are assessed against a criminal defendant. Mays v. State, 519 So.2d 618 (Fla.1988).
The conviction for possession of a firearm is reversed, the costs imposed are vacated, and the cause is remanded for a new sentencing hearing where the defendant may be heard on the matter of costs. The conviction and sentence for armed robbery is affirmed.