We reverse and remand for resentencing. The trial court erred by withholding the imposition of the mandatory minimum sentence required by section 893.13(1)(e)(1), Florida Statutes (1989). Instead, the trial court placed appellee in a drug treatment program pursuant to section 397.12, Florida Statutes (1989) and on probation.
This court has previously held that a trial court cannot rely on section 397.12 to downward depart from a mandatory *592minimum sentence even with valid reasons for departure. State v. Baumgardner, 587 So.2d 1147 (Fla. 4th DCA 1991); State v. Baxter, 581 So.2d 937 (Fla. 4th DCA 1991). Thus, the trial court’s reliance on section 397.12 to downward depart is error.
Furthermore, in State v. Ross, 447 So.2d 1380 (Fla. 4th DCA 1984) this court held that the trial court had no discretionary authority to withhold imposition of a mandatory minimum sentence and place defendant on probation after adjudication of guilt. This was because the statute unambiguously mandated that the sentence “shall” be imposed upon “conviction.”
In the instant case, section 893.13(1)(e)(l) states that anyone who “violates” the paragraph of the statute relating to the purchase of cocaine within 1,000 feet of a school “shall be sentenced to a minimum term of imprisonment of 3 calendar years.” Appellee admitted to violating the statute by pleading nolo contendere. Therefore, the trial court erred in withholding imposition of the mandatory minimum sentence and placing appellee on probation.
Accordingly, upon remand the trial court shall sentence appellee to the mandatory minimum.
REVERSED AND REMANDED WITH DIRECTIONS.
HERSEY, GUNTHER and GARRETT, JJ., concur.