
502 So.2d 955 (1987)
STATE of Florida, Appellant,
v.
John Robert McCARTHY, Appellee.
No. 86-151.
District Court of Appeal of Florida, Second District.
January 28, 1987.
Rehearing Denied February 23, 1987.
*956 Robert A. Butterworth, Atty. Gen., Tallahassee, and Katherine V. Blanco, Asst. Atty. Gen., Tampa, for appellant.
James Marion Moorman, Public Defender, Bartow, and Paul C. Helm, Asst. Public Defender, Bartow, for appellee.
PER CURIAM.
The appellee, John Robert McCarthy, was convicted of burglary of a dwelling and grand theft in violation, respectively, of sections 810.02 and 812.014, Florida Statutes (1985).
The guidelines scoresheet recommended 4 1/2 to 5 1/2 years of incarceration. The trial court, however, departed downward and sentenced McCarthy to 2 years of community control for the grand theft conviction, followed by 15 years probation imposed for the burglary conviction. The trial court's written reason for departure stated "as per plea agreement  defendant waived any right to be sentenced under the guidelines if probation revoked." The state unsuccessfully objected to the departure and appealed from the sentence imposed upon McCarthy.
This was not the type of plea agreement which can serve as a basis to depart the guidelines. A true plea bargain contemplates an agreement between the state and the defendant which is approved by the court. Fla.R.Crim.P. 3.171; ABA Standards, Pleas of Guilty §§ 3.1-3.3 (1968). Here, the state was not a party to the agreement.
A plea agreement that can serve as a clear and convincing reason for departure is one specifying a permissible sentence. Bell v. State, 453 So.2d 478 (Fla. 2d DCA 1984). McCarthy agreed to allow the court to depart to an indeterminate extent, save as it would be limited by the statutory maximum, should he in the future violate the terms of his probation. We will not approve an agreement that frustrates sentencing consistent with the guidelines. Henry v. State, 498 So.2d 1006 (Fla. 2d DCA 1986). "A defendant cannot by agreement confer on the court the authority to impose an illegal sentence. If a departure is not supported by clear and convincing reasons, the mere fact that a defendant agrees to it does not make it a legal sentence." Williams v. State, 500 So.2d 501 (Fla. 1986).
We reverse the appellee's sentence and remand for resentencing within the guidelines. The trial court may, however, depart for valid reasons. See, e.g., State v. Twelves, 463 So.2d 493 (Fla. 2d DCA 1985).
GRIMES, A.C.J., and SCHEB and FRANK, JJ., concur.
