
    Sheldon I. KAMINSKY, Appellant, v. STATE of Florida, Appellee.
    No. 98-2497.
    District Court of Appeal of Florida, Fourth District.
    May 5, 1999.
    Rehearing Denied June 3, 1999.
    Sheldon I. Kaminsky, Wewahitchka, pro se.
    Robert A. Butterworth, Attorney General, Tallahassee and Myra J. Fried, Assistant Attorney General, West Palm Beach, for appellee.
   WARNER, J.

Appellant moved for postcoriviction relief, claiming that his habitual violent offender sentence for two armed burglaries was illegal because the' offenses were not committed within five years of'a prior qualifying felony or within five years of being released from prison on a sentence imposed as a result of a prior enumerated felony. The trial court summarily denied relief. We reverse for an evidentiary hearing.

At a change of plea hearing at which appellant agreed to plead guilty in exchange for'a sentence of forty years, there was much confusion about whether he qualified for habitual offender treatment. The appellánt had been incarcerated in 1986 and was released from prison. Although he had been charged in 1990 with violating his probation, and was sentenced for his prior convictions on qualifying offenses to nineteen years in prison with credit for sixteen years, he claimed to the judge that he never actually went back to prison. The- offenses for which he was habitualized were committed approximately four years later.

At the plea hearing, even the prosecutor expressed some skepticism as to whether the appellant qualified for habitual violent felony offender status based upon his record. Nevertheless, the trial court wanted either the plea to be taken or the trial to continue. Given this choice, appellant stipulated that he qualified for habitual offender status, despite informing the court of facts which may show that he did not qualify.

In response to the postconviction motion, the state argues that appellant stipulated that he qualified for habitual offender status. However, in Larson v. State, 572 So.2d 1368, 1371 (Fla.1991), the court stated “[a] defendant cannot confer on others a right to do something the law does not permit. For example, a defendant cannot by agreement confer on a judge authority to exceed the penalties established by law. Such an illegal sentence must fail.” (citation omitted)/' Thus, appellant’s stipulation as to his qualification to be sentenced as a habitual offender is unavailing. We therefore reverse and remand for an evi-dentiary hearing on the issue.

We affirm the trial court’s denial as to all other issues raised in the motion for postconviction relief.

STEVENSON and GROSS, JJ., concur.  