
973 So.2d 679 (2008)
Larry D. MORALES, Appellant,
v.
STATE of Florida, Appellee.
No. 2D07-1067.
District Court of Appeal of Florida, Second District.
February 13, 2008.
James Marion Moorman, Public Defender, and Clark E. Green, Assistant Public Defender, Bartow, for Appellant.
Bill McCollum, Attorney General, Tallahassee, and Deborah Fraim Hogge, Assistant Attorney General, Tampa, for Appellee.
SILBERMAN, Judge.
Larry D. Morales entered a guilty plea to home-invasion robbery and contends on *680 appeal that the trial court erred by denying, without a hearing, his oral motion to withdraw plea before sentencing. We reverse and remand for a hearing on his motion to withdraw plea.
The State charged Morales under section 812.135(2)(a), Florida Statutes (2006), with home-invasion robbery with a firearm, a first-degree felony punishable by a term of years not exceeding life imprisonment.[1] On February 21, 2007, the day `of trial, Morales accepted the State's plea offer. The plea form indicates that he was entering a plea to "Robbery (Home Invasion; > $300; Deadly Weapon)" with a maximum penalty of thirty years. The form indicates that the parties agreed to a ten-year prison sentence, and a discussion during the plea colloquy confirmed that the plea was for the reduced charge of home-invasion robbery "involving a deadly weapon not a firearm." However, the prosecutor and the trial court referred to section 812.135(2)(b), which addresses home-invasion robbery with a weapon rather than a firearm or a deadly weapon.
The scoresheet describes the crime as home-invasion robbery and cites to section 812.135, but it makes no reference to the use of any firearm, deadly weapon, or weapon. Later in the hearing, the State advised the trial court that the applicable statute was section 812.135(2)(a), not 812.135(2)(b). Thus, there appeared to be some confusion regarding which offense in section 812.135(2) was the subject of the parties' plea agreement.[2]
The trial court agreed to delay sentencing for one week, and on March 1, 2007, the parties appeared for sentencing. At the beginning of the hearing defense counsel stated, "Well, Your Honor I've spoken to Mr. Morales and we've discussed this at length, and he at this time wants to withdraw his plea." The trial court immediately responded, "I knew that was coming. I knew it was coming. I'll deny the request. What was the agreed deal?" The trial court then told defense counsel to "Make it up with the District Court" and proceeded to sentence Morales to the negotiated ten-year sentence. The court directed that a note be placed on the docket to reflect "that the defendant made an oral motion to withdraw plea and Court denied without hearing. He can take it up on appeal."
Florida Rule of Criminal Procedure 3.170(f) provides that "[t]he court may in its discretion, and shall on good cause, at any time before a sentence, permit a plea of guilty or no contest to be withdrawn[.]" Here, Morales made an oral motion to withdraw his plea before the court imposed a sentence.
J.D.F. v. State, 870 So.2d 86 (Fla. 2d DCA 2003), involved similar circumstances. After J.D.F. entered negotiated pleas to two charges, the trial court conducted a separate disposition hearing. At that hearing, J.D.F. sought to withdraw his pleas. The trial court immediately denied the motion and "added that if J.D.F. wished to address the issue on appeal, he would appoint separate counsel for that purpose." Id. at 87. This court vacated the juvenile commitment order and remanded for the trial court to conduct a hearing on J.D.F.'s motion to withdraw pleas. We stated that "the trial court erred in immediately denying J.D.F.'s motion to withdraw his pleas without giving *681 him an opportunity to present argument and be heard." Id.
Contrary to the State's argument, the fact that the trial court delayed Morales' sentencing for one week at his request is not a significant distinction that would render J.D.F. inapplicable here. Rule 3.170(f) allows a defendant to move to withdraw his plea before the court imposes a sentence, and Morales did just that.
In J.D.F. this court relied on Gunn v. State, 643 So.2d 677, 679 (Fla. 4th DCA 1994), There, Gunn "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." Id. at 679. The Fourth District determined that "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." Id.
Similarly, the trial court should have given Morales the opportunity to present argument and be heard on his motion to withdraw his guilty plea before sentencing. Therefore, we reverse and vacate Morales' sentence, and we remand for the trial court to conduct a hearing on his motion to withdraw plea.
Reversed and remanded.
DAVIS, J., and GALLEN, THOMAS M., Associate Senior Judge, Concur.
NOTES
[1]  Section 812.135(2)(a) applies to home-invasion robbery with "a firearm or other deadly weapon."
[2]  We note that the written judgment reflects the conviction is pursuant to section 812.135(2)(c), which is home-invasion robbery with no weapon, a first-degree felony.
