The defendant appeals an order partially granting defendant’s motion to correct illegal sentence, pursuant to Rule 3.800.
The defendant’s motion requested relief from an illegal sentence on two grounds. The first ground, that he had been allotted the incorrect amount of jail time served, was stipulated to by the state, and the circuit court entered an order granting relief. The second ground stated is that the trial court exceeded the permitted guideline range of seven (7) to' twenty-two (22) years by imposing a sentence of twenty-two (22) years followed by life probation, without giving reasons for departure.
The defendant’s sentence does exceed the permitted guideline range calculated on his scoresheet. However, the sentence does not exceed the statutory maximum for second degree murder with a firearm, which is a felony of the first degree and is punishable by imprisonment for a term of years not exceeding life. §§ 775.082; 782.04 Fla.Stat. (1991). So, the sentence is not illegal within the meaning of rule 3.800(a). An illegal sentence is one that exceeds the maximum period set forth by law for a particular offense without regard to the guidelines. See Gartrell v. State, 626 So.2d 1364 (Fla.1993). This is not a “fundamental” error that may be raised at any time, since the sentence is within the maximum period allowed by law. See Davis v. State, 661 So.2d 1193 (Fla.1995). Therefore, the failure of the trial judge to provide written reasons for a departure sentence may not be raised for the first time in a collateral relief proceeding.
Affirmed.