
76 So.3d 1103 (2011)
Andre FRISON, Appellant,
v.
STATE of Florida, Appellee.
No. 5D11-2392.
District Court of Appeal of Florida, Fifth District.
December 30, 2011.
*1104 James S. Purdy, Public Defender, and David S. Morgan, Assistant Public Defender, Daytona Beach, for Appellant.
Pamela Jo Bondi, Attorney General, Tallahassee, and Allison Leigh Morris, Assistant Attorney General, Daytona Beach, for Appellee.
GRIFFIN, J.
Andre Frison ["Frison"] appeals the sentence that he received upon resentencing. He contends it was error to resentence him without counsel. We agree and reverse.
Frison was sentenced in 1989 to life in prison for sexual battery with a deadly weapon pursuant to section 794.011(2), Florida Statutes (1987). He was originally sentenced to 100 years in prison, but, after his appeal, he was resentenced to life in prison.
Frison then filed a pro se rule 3.800 motion to correct illegal sentence seeking resentencing on the basis of Graham v. Florida, ___ U.S. ___, 130 S.Ct. 2011, 176 L.Ed.2d 825 (2010).[1] The State conceded that because Frison was a juvenile at the time he committed the charged offense, Graham applied, making his life sentence without the possibility of parole an illegal sentence. At the hearing on the rule 3.800 motion, the court asked for the prosecutor's position concerning sentencing. The prosecutor agreed that Frison could not be sentenced to life and asked for the maximum allowed of forty years. The trial court granted the motion and immediately resentenced Frison to forty years in prison followed by one year of community control and life probation. The transcript of the hearing makes clear that the purpose of the hearing was to consider Frison's rule 3.800 motion to correct illegal sentence. There is no indication from the record that Frison was aware that a resentencing would occur, and he did not have counsel.
On appeal, Frison contends that he was denied due process because he did not receive notice of sentencing, he was not allowed to speak at the hearing, and, most notably, that he was not represented by an attorney.
In both capital and noncapital cases, our supreme court has held that resentencing is a new proceeding. State v. Collins, 985 So.2d 985, 989 (Fla.2008). A defendant has a due process right to notice of the sentencing hearing, the right to be heard and the right to legal representation. Stang v. State, 24 So.3d 566, 570 (Fla. 2d DCA 2009). "Resentencing is a critical stage of a criminal proceeding in which the full panoply of due process considerations attach, including the appointment of counsel." Payne v. State, 38 So.3d 827, 828 (Fla. 1st DCA 2010). An indigent defendant is entitled to appointed counsel at resentencing after prevailing on a rule 3.800 motion. Mahone v. State, 39 So.3d 1278 (Fla. 5th DCA 2010).
The State acknowledges that a defendant is entitled to counsel at a resentencing hearing, even when a rule 3.800(a) motion is granted. However, the State asserts that this is not required when the trial court is merely conducting a ministerial act. The State contends that Frison's resentencing was merely "ministerial" because *1105 all of the parties agreed that, under Graham, Frison's life sentence was illegal; therefore, the only option remaining upon resentencing was the imposition of a forty-year sentence. In other words, the State asserts that the imposition of the forty-year sentence was mandatory; thus, there was no need for appointed counsel.
Frison was originally convicted of sexual battery with a deadly weapon, a life felony under section 794.011(3), Florida Statutes (1987). The 1987 version of section 794.011 states:
A person who commits sexual battery upon a person 12 years of age or older, without that person's consent, and in the process thereof uses or threatens to use a deadly weapon or uses actual physical force likely to cause serious personal injury is guilty of a life felony, punishable as provided in s. 775.082, s. 775.083, or s. 775.084.
Section 775.082(3), Florida Statutes (1987) states in pertinent part:
(3) A person who has been convicted of any other designated felony may be punished as follows:
(a) For a life felony committed prior to October 1, 1983, by a term of imprisonment for life or for a term of years not less than 30 and, for a life felony committed on or after October 1, 1983, by a term of imprisonment for life or by a term of imprisonment not exceeding 40 years.

(Emphasis added). The emphasized language of section 775.082(3)(a) gives the court the discretion to sentence Frison to less than forty years. Moreover, Frison was entitled to be heard on the community control and life probation. Frison is entitled to a new resentencing hearing and to counsel.
SENTENCE VACATED and REMANDED.
MONACO and SAWAYA, JJ., concur.
NOTES
[1]  The United States Supreme Court held that "the Constitution prohibits the imposition of a life without parole sentence on a juvenile offender who did not commit homicide." 130 S.Ct. at 2034.
