
772 So.2d 48 (2000)
STATE of Florida, Appellant,
v.
J. Patrick SWETT, Appellee.
No. 5D00-84.
District Court of Appeal of Florida, Fifth District.
October 6, 2000.
Rehearing Denied November 27, 2000.
Robert A. Butterworth, Attorney General, Tallahassee, and Carmen F. Corrente, Assistant Attorney General, Daytona Beach, for Appellant.
Donald R. West, Orlando, for Appellee.
*49 COBB, J.
The state appeals an order modifying Swett's sentence which had been imposed pursuant to a plea agreement. Pursuant to said agreement, the state reduced the original charge of first degree murder to second degree murder and Swett pled nolo contendere thereto, along with various other charges, in exchange for a recommended sentencing range of 35-55 years imprisonment with the further condition that the sentence imposed on Swett, the shooter of the victim, would be greater than the sentence imposed upon his accomplice in the home invasion resulting in the shooting.
The trial court accepted the plea and signed the written plea agreement. At the sentencing hearing the state insisted upon the quid pro quo of 35-55 years incarceration for Swett in return for reduction of the first degree murder charge. In accordance with the agreement the trial court sentenced Swett to 38.5 years incarceration, which was six months longer than the sentence given the codefendant. Swett also received 15 years of consecutive probation.
Within the sixty-day period provided by Florida Rule of Criminal Procedure 3.800(c),[1] Swett filed a motion to modify the sentence seeking mitigation of the incarcerative period. He argued that the plea agreement did not require him to waive his right to seek modification, and contended that numerous mitigating factors existed which would support mitigation. At a hearing on the motion numerous witnesses were presented by Swett and the state. The thrust of the testimony of Swett's witnesses was that he obtained his GED while incarcerated, undertook to tutor other inmates, seemed remorseful and wrote letters to his younger brothers encouraging them to stay out of trouble and avoid drugs. The victims' relatives testified and asked that no reduction in sentence be ordered. At the conclusion of the testimony the state announced its objection to any modification of sentence, stating:
First of all, why are we even having this proceeding today? At the time that Mr. Swett entered a plea and was ultimately sentenced, he entered into a quid pro quo bargain. That isand as he's certainly agreed occurred in this case, in exchange for giving up the first-degree murder charge, in exchange for giving up a life sentence without the possibility of parole. The State has given something up. He has already undertaken a sentence that has benefitted him.
* * *
From a review of the record, it appears that this proceeding is simply a rehash of last year's sentencing. It also appears that this is an attempt to make an end run around a plea bargain.
The state further pointed out that if Swett's sentence was modified downward, another violation of the plea agreement would occur: the defendant would not receive a sentence greater than that of his codefendant.
The trial court reduced Swett's term of incarceration to 21 years. The court indicated that this would be a downward departure sentence but justified departure on the following grounds: (1) age of the defendant at the time of the offense, (2) defendant was under the influence of a controlled substance at the time of the offense, (3) defendant suffered from mental illness, (4) the defendant was under the influence of his adult confederate at the time of the offense and (5) the defendant cooperated with law enforcement.
*50 On appeal the state argues that the defendant achieved an "end run" around the plea agreement by seeking and obtaining a mitigation of the incarcerative portion of his sentence to that substantially below the range contained in the plea agreement. The state points out that a plea agreement is a contract between the state, represented by the prosecutor, and the defendant. See State v. Frazier, 697 So.2d 944 (Fla. 3d DCA 1997), State v. Warner, 721 So.2d 767 (Fla. 4th DCA 1998), approved, 762 So.2d 507 (Fla.2000). The state asserts that where a guilty or nolo plea is part of a quid pro quo whereby the state has agreed to drop or reduce a charge, the state is entitled to insist on adherence to the terms of the plea or in the alternative be accorded the opportunity to void the plea and take the defendant to trial on the original charges. See, e.g., Parker v. State, 767 So.2d 532 (Fla. 5th DCA 2000)(on rehearing); Jolly v. State, 392 So.2d 54 (Fla. 5th DCA 1981). In Parker, for instance, this court, in reversing the defendant's sentence on a Heggs[2] issue (unconstitutionality of 1995 amendments which increased incarcerative periods under sentencing guidelines), remanded not for automatic resentencing under the 1994 version of the guidelines, but rather to allow the state the option of invalidating the plea since the sentence was imposed in conjunction with a plea agreement, part of the quid pro quo being the dropping of an additional charge by the prosecutor.
Swett counters that the trial court, in originally imposing a sentence of 38.5 years imprisonment, fully complied with the terms of the plea agreement. Swett asserts that the trial court acted within its discretion in granting his timely motion for modification of sentence and, further, that an order granting a motion to modify a sentence is not appealable by the state.
Florida Rule of Criminal Procedure 3.800(c) provides:
Reduction and Modification. A court may reduce or modify to include any of the provisions of chapter 948, Florida Statutes, a legal sentence imposed by it within 60 days after such imposition, or within 60 days after receipt by the court of a mandate issued by the appellate court on affirmance of the judgment and/or sentence on an original appeal, or within 60 days after receipt by the court of a certified copy of an order of the appellate court dismissing an original appeal from the judgment and/or sentence, or, if further appellate review is sought in a higher court or in successively higher courts, then within 60 days after the highest state or federal court to which a timely appeal has been taken under authority of law, or in which a petition for certiorari has been timely filed under authority of law, has entered an order of affirmance or an order dismissing the appeal and/or denying certiorari. This subdivision of the rule shall not, however, be applicable to those cases in which the death sentence is imposed or those cases in which the trial judge has imposed the minimum mandatory sentence or has no sentencing discretion.
The trial court's jurisdiction is not contested as the court entered the order of modification within sixty days of issuance of the appellate mandate following Swett's unsuccessful appeal.
As to appellate review, the denial of a motion to reduce a legal sentence is generally not reviewable since the trial court's ruling is purely discretionary. See State v. Baca, 707 So.2d 766 (Fla. 2d DCA 1998); Royal v. State, 736 So.2d 157 (Fla. 3d DCA 1999).[3] We deal here, however, *51 with the granting of a motion to mitigate. While there is no express reference in Florida Rule of Appellate Procedure 9.140(c)(1), which deals with appeals by the state, of review of orders granting mitigation, that rule does provide that the state may appeal an order:
(J) Imposing an unlawful or illegal sentence or imposing a sentence outside the range permitted by the sentencing guidelines.
It appears that this jurisdictional basis for review of an order granting mitigation of a sentence was recently employed in State v. Stalvey, 25 Fla. L. Weekly D961, ___ So.2d ___, 2000 WL 370269 (Fla. 1st DCA April 12, 2000) where the trial court granted the defendant's motion for mitigation under Rule 3.800(c)[4] and departed downward from the guideline sentence which the defendant received for lewd and lascivious conduct with a fourteen year old. The stated ground for the departure was that the victim was a willing participant in the crime. The majority in Stalvey held that willing participation cannot be a basis for downward departure and reversed the sentence.
In the instant case, the trial court, in granting mitigation, indicated that in reducing Swett's sentence to 21 years imprisonment, it was imposing a downward departure sentence. Swett acknowledges in his brief that assuming correction of a purported scoresheet error, the sentencing range in this case was 321.75 to 536.25 months incarceration, at least absent consideration of the Heggs issue.[5] A sentence of 21 years incarceration or 252 months is thus a downward departure.
That a downward departure may or may not be justified in this case is not the appellate issue. A trial court may consider the appropriateness of a sentence which deviates from the sentencing range contained in a plea agreement. However, the court's authority to impose such a sentence in a plea context is circumscribed. In Goins v. State, 672 So.2d 30 (Fla.1996), the supreme court held that when the trial court elects to sentence the defendant to a term of imprisonment greater than provided in the plea agreement, the court must affirmatively offer the defendant the right to withdraw the plea. As a plea agreement is a contract between the parties, the state must likewise be accorded the opportunity to void the plea agreement where a lesser sentence than that contemplated by the plea agreement will be imposed. See Parker. See also Rickman v. State, 713 So.2d 1115 (Fla. 5th DCA 1998).
This conclusion is subject to a significant caveat recently recognized in State v. Warner, 762 So.2d 507 (Fla.2000). In Warner, the supreme court held that judicial participation in the plea bargaining process is permissible[6] and that the state cannot object to acceptance by the court of a plea to the charges as filed by the prosecutor. In Warner, the trial court indicated that it would impose a downward departure sentence and the defendant pled guilty to the charges filed against him. The downward departure sentence was imposed and the state appealed. The Fourth District reversed the sentence finding that the *52 grounds stated for departure were invalid. However, the appellate court rejected the contention that the trial court was precluded from advising a defendant, over the state's objection, of the sentence it would impose if the defendant pled guilty to the charges filed by the state. The appellate court added that the trial court could not, over the state's objection, reduce the charge and accept a plea to the reduced charge. The supreme court approved the district court's analysis. See also State v. Cure, 760 So.2d 243 (Fla. 3d DCA 2000)(state cannot complain where trial court decides to ignore plea agreement and impose lesser sentence; no quid pro quo for agreement indicated).
In the instant case, the plea was part of a deal whereby the prosecutor reduced the murder charge to second degree murder in exchange for the plea. The sentence was part of a quid pro quo and the defendant cannot accept the benefit of the bargain without accepting its burden. Warner does not control. Moreover, to permit the evasion of negotiated pleas and sentences by utilization of a Rule 3.800 motion in mitigation would discourage the state from entering into plea bargains in the future.
The trial court erred in reducing the incarcerative portion of the sentence at the mitigation hearing where said sentence was imposed as part of a negotiated plea. The order of mitigation must therefore be reversed. Swett's claim, raised for the first time on this appeal, that a Heggs issue exists in that the 1995 sentencing guidelines under which he entered his plea have since been declared unconstitutional can be raised by proper motion in the trial court. See Parker.
REVERSED.
PETERSON and SAWAYA, JJ., concur.
NOTES
[1]  Following imposition of sentence, Swett filed an appeal with this court which resulted in an affirmance without written opinion. See Swett v. State, 743 So.2d 1103 (Fla. 5th DCA 1999)(Table). Mandate was issued on October 15, 1999 and on November 3, 1999, Swett filed his motion to modify the sentence.
[2]  Heggs v. State, 759 So.2d 620 (Fla.2000).
[3]  A circuit court order on mitigation of sentence which determines an issue not wholly within the court's discretion may be reviewed by way of certiorari. See Knafel v. State, 714 So.2d 1195 (Fla. 2d DCA 1998). Thus, where the circuit court erroneously denies a motion for mitigation on the ground that it is untimely, certiorari may be employed to quash the order of denial. See, e.g., Brown v. State, 707 So.2d 1191 (Fla. 2d DCA 1998); Arnold v. State, 621 So.2d 503 (Fla. 5th DCA 1993). Conversely, where a trial court is without jurisdiction due to the untimely consideration of a motion for mitigation and erroneously grants mitigation, an appellate court will quash the order by way of certiorari. See, e.g., State v. Baca; State v. Rhodes, 554 So.2d 1229 (Fla. 2d DCA 1990).
[4]  The procedural posture of the case is taken from Judge Benton's dissent.
[5]  Swett asserts in his brief that Heggs applies to this case since he was sentenced under the 1995 guidelines and that his present sentence of 21 years or 252 months actually falls within the sentencing range available under the 1994 guidelines.
[6]  Disapproving this court's en banc decision in State v. Gitto, 731 So.2d 686 (Fla. 5th DCA 1998).
