
    Scott G. PURVIS, Petitioner, v. The Honorable Hubert R. LINDSEY, Circuit Court Judge of the Fifteenth Judicial Circuit ex rel. STATE of Florida, Respondent.
    No. 91-2531.
    District Court of Appeal of Florida, Fourth District.
    Oct. 16, 1991.
    
      Craig A. Boudreau, West Palm Beach, for petitioner.
    Robert A. Butterworth, Atty. Gen., Tallahassee, and James J. Carney, Asst. Atty. Gen., West Palm Beach, for respondent.
   PER CURIAM.

Petitioner has filed a petition for writ of habeas corpus, contending that he is being illegally detained on probation and that the trial court lacks jurisdiction to proceed with a violation of probation hearing.

Petitioner pled guilty to a second degree misdemeanor punishable by a maximum of 60 days in jail. See § 322.212(6), Fla.Stat. (1989); § 775.082(4)(b), Fla.Stat. (1989). In accordance with a plea agreement he was placed on one year’s probation. More than six months after he was placed on probation, an affidavit of violation of probation was filed. Petitioner then filed a motion to terminate probation and recall mandate, contending that: (1) the crime to which he had pled guilty was only a second degree misdemeanor, (2) second degree misde-meanants cannot be placed on probation for more than six months, (3) accordingly, his probation terminated after six months, and (4) therefore the trial court was without jurisdiction to entertain the violation of probation charges. The trial court denied petitioner’s motion and scheduled a final violation of probation hearing which this court sua sponte stayed.

It is well settled that it is error to place a defendant on probation for more than six months for a second degree misdemeanor which is punishable by a maximum term of sixty days. See Alderman v. State, 356 So.2d 928 (Fla. 2d DCA 1978); Bouie v. State, 360 So.2d 1142 (Fla. 2d DCA 1978). See also Holloway v. State, 393 So.2d 1185 (Fla. 2d DCA 1981); Corraliza v. State, 391 So.2d 330 (Fla. 3d DCA 1980), rev. denied, 399 So.2d 1141 (Fla.1981). Additionally, it has been held that “a court lacks jurisdiction to entertain an application for revocation of probation based upon a violation which occurred during the probationary period unless, during the term of probation, appropriate steps were taken to revoke or modify probation.” Clark v. State, 402 So.2d 43 (Fla. 4th DCA 1981). See also Davidson v. State, 506 So.2d 43 (Fla. 2d DCA 1987); McPherson v. State, 530 So.2d 1095 (Fla. 1st DCA 1988).

We reject the state’s contention that the second sentence in section 948.04, Florida Statutes (1989), means that a second degree misdemeanant can be placed on probation for one year. See 15 Fla.Jur.2d Criminal Law 912 (Supp.1990) and compare Smith v. State, 484 So.2d 581 (Fla.1986). We also reject the state’s contention that petitioner waived his right to contest his illegal sentence because the sentence was the result of a negotiated plea agreement. A defendant cannot acquiesce in an illegal sentence, see Davis v. State, 552 So.2d 338 (Fla. 4th DCA 1989), and can attack an illegal sentence at any time. See Bouie, 360 So.2d at 1142; Fla.R.Crim.P. 3.800(a). The cases relied on by the state in its response are distinguishable from the instant case.

Finding that the trial court erred in sentencing petitioner to more than six months’ probation, and that the trial court lacks jurisdiction to proceed with a violation of probation hearing, we grant the petition for writ of habeas corpus and order petitioner discharged.

DOWNEY, DELL and GARRETT, JJ., concur.  