
643 So.2d 677 (1994)
Dexter GUNN, Appellant,
v.
STATE of Florida, Appellee.
No. 93-2254.
District Court of Appeal of Florida, Fourth District.
October 12, 1994.
*678 Richard L. Jorandby, Public Defender, and Anthony Calvello, Asst. Public Defender, West Palm Beach, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Sarah B. Mayer, Asst. Atty. Gen., West Palm Beach, for appellee.
STEVENSON, Judge.
Appellant, Dexter Gunn, pled guilty to armed robbery, armed kidnapping and possession of a firearm by a convicted felon. He was subsequently sentenced as a violent habitual offender on each conviction. Appellant challenges his sentence and the trial court's denial of his motion to withdraw his plea. For the reasons stated below, we reverse.
A brief review of the somewhat tortured procedural background of this case is necessary to fully understand the decision that follows. During the course of Gunn's trial, he changed his previously entered pleas of not guilty and pled guilty to armed robbery, armed kidnapping and possession of a firearm by a convicted felon. At the subsequent sentencing hearing, Gunn's attorney advised the court that Gunn had discussed with him "his second thoughts about entering this plea... ." The court instructed defense counsel to make a motion to withdraw the plea if that was his intention. Defense counsel replied, "I'm not making the motion, Judge. It's not clear to me what Gunn wants to do at this point, honestly." Gunn joined in and said that he "would like to make a motion to withdraw the plea" to which the trial court replied, "[m]otion denied." At the conclusion of the sentencing hearing, the trial court declared Gunn a violent felony habitual offender and sentenced him to fifteen years in prison for the firearm charge. The court sentenced Gunn to forty years in prison with a mandatory minimum fifteen years as a violent habitual felony offender for the armed robbery charge and forty years in prison for armed kidnapping. All of the sentences were ordered to run concurrently. Gunn subsequently filed a rule 3.850 motion and asked for a belated appeal alleging that his counsel had failed to file an appeal as he had requested. The trial court denied the motion without a hearing. In Gunn v. State, 612 So.2d 643 (Fla. 4th DCA 1993), this court reversed the trial court and remanded the cause for an evidentiary hearing on the issue of whether Gunn had told his trial counsel that he wanted to appeal and whether trial counsel neglected to file the notice of appeal. At the hearing on remand, appellant's counsel filed a written motion to withdraw guilty pleas. However, the court refused to consider that motion and determined that the only appropriate issue on remand was whether to allow Gunn a belated appeal. At the hearing on remand, the trial court granted Gunn's request to file a belated appeal. This appeal followed.
Appellant raises two issues in this appeal. First, he argues that the trial court erred in denying his motion to withdraw his guilty pleas made prior to sentencing. Gunn argues that the motion to withdraw his guilty pleas should have been granted because the state failed to give prior written notice of intent to habitualize and the trial judge failed to adequately inform him of all the significant consequences of habitualization, thus rendering his plea involuntary. See Ashley v. State, 614 So.2d 486 (Fla. 1993). Gunn asks that this court vacate his pleas and remand this cause for a new trial. In the alternative, Gunn asks that this court vacate his classification as a violent habitual felony offender on the firearm and armed robbery charges and remand for resentencing on those offenses *679 within the permitted guidelines range and without habitual offender classification.
To begin with, we agree with appellant that the trial court erred in denying the motion to withdraw his guilty pleas. However, our reasons differ from those advanced by appellant. Appellant suggests that the trial court erred in denying the motion to withdraw the guilty pleas on the merits of his underlying arguments. With this we cannot agree because appellant made no arguments before the trial court and presented no reasons for his motion to withdraw guilty pleas. However, a review of the transcript convinces us that appellant was improperly cut off from attempting to argue his motion because as soon as Gunn said that he wanted to make a motion to withdraw his pleas, the court promptly stated, "[m]otion denied" and proceeded to sentencing. Rule 3.170(f), Florida Rules of Criminal Procedure, requires that a motion for withdrawal of guilty plea be made "before" sentencing and provides that the motion "shall" be granted if good cause is shown. The trial court's abrupt ruling eliminated any chance for appellant to even attempt to show a good cause basis for making his motion. Certainly, after hearing the trial judge's ruling on the motion, appellant and his counsel were not required to argue further with the court or on the motion. Therefore, as a matter of fundamental due process, Gunn should have been given the opportunity to present argument and be heard on the motion to withdraw his guilty pleas.
Because we determine that the trial court erred in failing to give appellant a fair opportunity to be heard on his timely motion to withdraw his pleas, we vacate appellant's sentences. Therefore, we do not reach appellant's alternative claim for relief, i.e., that he be sentenced without habitual classification because the state failed to give prior written notice of habitualization and the trial court failed to adequately advise him of all of the significant consequences of habitualization.
Accordingly, we vacate appellant's sentences and remand this case to the trial court to give appellant a hearing on the motion to withdraw his guilty pleas. After appellant's motion is disposed of, the trial court may then proceed as appropriate depending on the outcome of this hearing.
REVERSED AND REMANDED.
GUNTHER and KLEIN, JJ., concur.
