
589 So.2d 343 (1991)
Lucio John SALAS, Appellant,
v.
STATE of Florida, Appellee.
No. 91-2219.
District Court of Appeal of Florida, Fourth District.
November 6, 1991.
Motion for Rehearing or Certification of Question of Great Public Importance Denied December 20, 1991.
*344 Lucio John Salas, pro se.
Robert A. Butterworth, Atty. Gen., Tallahassee and Joan Fowler, Asst. Atty., West Palm Beach, for appellee.
PER CURIAM.
Appellant appeals the summary denial of his 3.850 motion for post-conviction relief and claims that his sentences were unlawful. We reverse.
Appellant was convicted of four counts of sexual battery, two counts of kidnapping and one count of burglary with intent to commit assault and battery. He was sentenced to ninety-nine years in prison on every sentence with each sentence to run consecutively with each other and consecutive to any other active sentence. This court affirmed in Salas v. State, 544 So.2d 1040 (Fla. 4th DCA 1989), but vacated the conviction and sentence on the burglary charge.
Appellant subsequently filed this timely 3.850 motion for post-conviction relief asserting that his sentence is illegal and in excess of the maximum allowed by law. The trial court summarily denied the petition after considering a response filed by the state. In his motion, appellant contended that his sentences for sexual battery exceeded the statutory maximum in section 794.011(3), Florida Statutes (1984), and his sentences for kidnapping exceeded the statutory maximum in section 787.01, Florida Statutes (1984). A sentencing error which causes a defendant to be incarcerated for a greater length of time than the law permits is fundamental error which can be corrected on appeal or by the trial court in collateral attack proceedings. Gonzalez v. State, 392 So.2d 334 (Fla. 3d DCA 1981).
Sexual battery is a life felony punishable as provided in section 775.082, 775.083 or 775.084. See section 794.011(2), Florida Statutes. Life felonies committed after October 1, 1983 are punishable "by a term of imprisonment for life or by a term of imprisonment not exceeding 40 years." Section 775.082(3)(a), Florida Statutes (1984). In Spivey v. State, 526 So.2d 762 (Fla. 2d DCA 1988), the second district construed section 775.082(3)(a), Florida Statutes (1987) to prohibit a court from sentencing a defendant for a life felony of sexual battery aggravated by the use of a weapon committed after October 1, 1983, to a term of incarceration for a period of years exceeding 40. The Spivey court reversed a sixty year sentence and remanded for resentencing to a term of years not to exceed forty. Cf. Ward v. State, 558 So.2d 166 (Fla. 1st DCA 1990) (once a trial court sentences a defendant under section 775.082(3)(a) to a term of years as opposed to a term of imprisonment for life, the total sentence, including any probationary period, must not exceed 40 years).
On the other hand, kidnapping is a first degree felony punishable by imprisonment for a term of years not exceeding life or as provided in section 775.082, 775.083 or 775.084. See section 787.01(2), Florida Statutes (1984). First degree felonies are punishable "by a term of imprisonment not exceeding 30 years or, when specifically provided by statute, by imprisonment for a term of years not exceeding life imprisonment." Section 775.082(3)(b), Florida Statutes. Since the kidnapping statute permits a sentence for a term of years not exceeding life, appellant's sentence is proper. Cf. Powlowski v. State, 467 So.2d 334 (Fla. 5th DCA 1985) (sentence of 300 years imprisonment for second degree murder conviction was not more than that authorized by statute *345 which states that crime is punishable by imprisonment for term of years not exceeding life).
Based on the foregoing, we reverse the denial of appellant's motion as to the sentences for sexual battery, and remand to the trial court with directions to grant the motion and resentence appellant to sentences not exceeding 40 years. We reject appellant's contentions regarding his sentences for kidnapping.
ANSTEAD and GUNTHER, JJ., concur.
STONE, J., dissents with opinion.
STONE, Judge, concurring in part and dissenting in part.
This record reflects the trial court's intention that this defendant spend as much of his life as possible in prison for the protection of society. That is why the court selected the higher term of years for the sexual batteries in imposing the consecutive sentences. Although I agree that the sentences must be reversed, I see no reason why the trial court, in the absence of any indication of vindictiveness, cannot impose life sentences on the resentencing for the sexual battery crimes. Cf. Blackshear v. State, 513 So.2d 174 (Fla. 1st DCA 1987).
