
955 So.2d 51 (2007)
Kevin MACK, Petitioner,
v.
STATE of Florida, Respondent.
No. 1D06-4096.
District Court of Appeal of Florida, First District.
March 26, 2007.
Rehearing Denied May 4, 2007.
*53 William Mallory Kent of the Law Office of William Mallory Kent, Jacksonville, for Petitioner.
Bill McCollum, Attorney General, and Alan R. Dakan, Assistant Attorney General, Tallahassee, for Respondent.
BENTON, J.
In a petition for writ of habeas corpus (styled petition for habeas corpus relief) Kevin Mack contends that counsel on his direct appeal was ineffective for failing to argue that Apprendi v. New Jersey, 530 U.S. 466, 120 S.Ct. 2348, 147 L.Ed.2d 435 (2000), and Blakely v. Washington, 542 U.S. 296, 124 S.Ct. 2531, 159 L.Ed.2d 403 (2004), required reversal of his sentence. We do not agree that Apprendi and Blakely have any application in his case and deny the petition.
As a federal constitutional matter, a criminal defendant is entitled to the assistance of counsel on the first appeal of right from a conviction, even if unable to afford private counsel. See Ross v. Moffitt, 417 U.S. 600, 606-15, 94 S.Ct. 2437, 41 L.Ed.2d 341 (1974); Douglas v. California, 372 U.S. 353, 354-58, 83 S.Ct. 814, 9 L.Ed.2d 811 (1963). "Habeas petitions are the proper vehicle to advance claims of ineffective assistance of appellate counsel." Rutherford v. Moore, 774 So.2d 637, 643 (Fla.2000). See Fla. R.App. P. 9.141(c)(2) (2006) ("Petitions . . . alleging ineffective assistance of appellate counsel shall be filed in the appellate court to which the appeal was or should have been taken.").
"When analyzing the merits of the claim, `[t]he criteria for proving ineffective assistance of appellate counsel parallel the Strickland [v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984),] standard for ineffective trial counsel.'" Rutherford, 774 So.2d at 643 (first alteration in original) (footnote omitted) (quoting Wilson v. Wainwright, 474 So.2d 1162, 1163 (Fla.1985)). The petitioner must show
first, that appellate counsel's performance was deficient because "the alleged omissions are of such magnitude as to constitute a serious error or substantial deficiency falling measurably outside the range of professionally acceptable performance" and second, that the petitioner was prejudiced because appellate counsel's deficiency "compromised the *54 appellate process to such a degree as to undermine confidence in the correctness of the result." Thompson [v. State, 759 So.2d 650, 660 (Fla.2000)]. If a legal issue "would in all probability have been found to be without merit" had counsel raised the issue on direct appeal, the failure of appellate counsel to raise the meritless issue will not render appellate counsel's performance ineffective. Williamson v. Dugger, 651 So.2d 84, 86 (Fla.1994).
Rutherford, 774 So.2d at 643 (citations omitted). See also Downs v. Moore, 801 So.2d 906, 910 (Fla.2001) (stating "appellate counsel cannot be deemed ineffective for failing to raise non-meritorious claims"). To prevail on a claim of ineffective assistance of counsel, trial or appellate, the defendant must establish "that counsel made errors so serious that counsel was not functioning as the `counsel' guaranteed the defendant by the Sixth Amendment." Strickland, 466 U.S. at 687, 104 S.Ct. 2052.
On March 4, 2004, Mr. Mack entered a plea of guilty to possession of a firearm by a convicted felon, a second degree felony. He had signed a plea agreement, styled Plea of Guilty and Negotiated Sentence, under which his sentence was to have been thirty-eight months in state prison, with a three-year minimum mandatory term, subject, however, to this proviso: "Sentence will be deferred until April 20, 2004. . . . If defendant fails to appear or commits a new crime supported by probable cause. Plea will stand but Defendant can receive any legal sentence." Petitioner does not seek to set aside the plea agreement and does not question its validity.
Our supreme court has held that plea agreements may contain conditions that depend on later fact finding. See Quarterman v. State, 527 So.2d 1380, 1382 (Fla.1988) (noting "the conditions which Quarterman agreed to were not imposed after the plea bargain had been accepted, but were accepted as `an integral part of the bargain itself'") (citations omitted).

Quarterman . . . teaches that there is nothing inherently wrong with making the agreed-upon sentence contingent upon the defendant's not committing another offense while at liberty and appearing at sentencing as ordered.
Bennett v. State, 858 So.2d 1251, 1252 (Fla. 5th DCA 2003). See id. at 1252-53 (indicating that, where a court-approved plea agreement contains conditions that subsequent events trigger,[1] the defendant "and the court [can be viewed as having] entered a valid modification of the plea agreement . . . authoriz[ing the court] to impose the sentence it did," even though more severe than the sentence the plea agreement originally called for).
While free on bond, after his plea had been accepted but before he was sentenced, Mr. Mack was arrested on charges of battery. After an evidentiary hearing at which both sides presented evidence, the trial court found probable cause to believe he had committed the battery, so *55 violating the plea bargain condition. On that account, the trial court concluded it was no longer bound to impose the thirty-eight-month sentence originally negotiated, and subsequently sentenced him to eight years' imprisonment.
Petitioner's judgment and sentence were affirmed on direct appeal, on August 11, 2005. Mack v. State, 908 So.2d 1061, 1061 (Fla. 1st DCA 2005). He filed the present petition for writ of habeas corpus on August 9, 2006, claiming that counsel on the direct appeal was ineffective. See Fla. R.App. P. 9.141(c)(4)(B) (2006) ("A petition alleging ineffective assistance of appellate counsel shall not be filed more than 2 years after the conviction becomes final on direct review unless it alleges under oath with a specific factual basis that the petitioner was affirmatively misled about the results of the appeal by counsel.").
Petitioner argues that Blakely and Apprendi require relief because the trial judge, not a jury, engaged in factfinding which became the basis for imposing an eight-year sentence, instead of the thirty-eight-month sentence he agreed to in the plea bargain. At issue is whether Blakely and Apprendi lay down a federal constitutional imperative, not whether empanelling a new jury for sentencing in a non-capital case is currently authorized under state law. See generally Galindez v. State, 32 Fla. L. Weekly S89, S92, ___ So.2d ___, ___, 2007 WL 471164 (Fla. Feb. 15, 2007) (Cantero, J., concurring) ("To remedy violations of Apprendi and Blakely, we would be entirely justified in adopting a procedure for the empanelling of new juries on resentencing.").
Preliminarily, the State contends that the issue was not preserved by appropriate objection in the trial court, and that appellate counsel cannot, for that reason, be faulted for failing to raise the issue. See Davis v. State, 928 So.2d 1089, 1127 (Fla.2005) ("Generally, appellate counsel cannot be ineffective for failing to present claims which were not preserved due to trial counsel's failure to object."). The State's preservation argument lacks force here.
Even if not raised adequately by trial counsel, an Apprendi claim could have been presented in a motion pursuant to Florida Rule of Criminal Procedure 3.800(b) at any time "before the party's first brief is served." Fla. R.Crim. P. 3.800(b)(2) (2004). See, e.g., Gisi v. State, 848 So.2d 1278, 1282 (Fla. 2d DCA 2003) ("Although the Apprendi issue was not raised at sentencing by trial counsel, appellate counsel could have preserved the issue for appellate review by filing a motion to correct a sentencing error in the trial court pursuant to Florida Rule of Criminal Procedure 3.800(b)(2)."); Arrowood v. State, 843 So.2d 940, 941-42 (Fla. 1st DCA 2003) (reversing because appellant was entitled to relief under Apprendi when the claim was raised during the pendency of the appeal in a Rule 3.800(b)(2) motion). Since appellate counsel could have preserved the issue, it is no defense to petitioner's claim of ineffective assistance that appellate counsel (like trial counsel) failed to do so.
The Court explained in Blakely "that the `statutory maximum' for Apprendi purposes is the maximum sentence a judge may impose solely on the basis of the facts reflected in the jury verdict or admitted by the defendant." Blakely, 542 U.S. at 303, 124 S.Ct. 2531.
In other words, the relevant "statutory maximum" is not the maximum sentence a judge may impose after finding additional facts, but the maximum [a judge] may impose without any additional findings. When a judge inflicts punishment that the jury's verdict alone does not *56 allow, the jury has not found all the facts which the law makes essential to the punishment, and the judge exceeds his proper authority.
Id. at 303-04, 124 S.Ct. 2531 (quotation marks and citation omitted). The maximum penalty prescribed by statute for the second degree felony petitioner committed and pleaded guilty to is fifteen years.[2] The trial court did not go beyond this "prescribed statutory maximum" when it imposed an eight-year sentence. Apprendi, 530 U.S. at 490, 120 S.Ct. 2348.
Petitioner was sentenced after the United States Supreme Court had decided both Apprendi and Blakely. Cf. Hughes v. State, 901 So.2d 837, 838 (Fla.2005) ("[W]e hold that Apprendi does not apply retroactively.") (emphasis omitted). But petitioner's argument founders because a sentence violates due process under Apprendi and Blakely only when it exceeds the "prescribed statutory maximum." Apprendi, 530 U.S. at 490, 120 S.Ct. 2348 ("Other than the fact of a prior conviction, any fact that increases the penalty for a crime beyond the prescribed statutory maximum must be submitted to a jury, and proved beyond a reasonable doubt.").
Apprendi and Blakely deal with the prerogatives of judges vis-a-vis juries, and stake out ground onto which the judge cannot intrude, without impermissibly adulterating the right to trial by jury. But it has never been held that parties can impose a cap on the length of a sentence that the sentencing judge is not free to reject in the sound exercise of judicial discretion. In Rollman v. State, 887 So.2d 1233, 1235 (Fla.2004), our supreme court held that a trial judge may "alter" a plea agreement at any time before sentence is imposed.
We continue to agree that a trial court retains the authority to alter a prior plea arrangement up until the time sentence is imposed, so long as the trial court provides the defendant an opportunity to withdraw any plea that was entered in reliance on the promised sentence. It does not matter whether the judge simply changed his mind, or whether there was a misunderstanding.
Id. The Rollman court also approved this court's ruling that "the defendant was not entitled to specific performance of the [plea] agreement, but was limited to withdrawing his plea."[3]Id. See also Santobello, 404 U.S. at 262-63, 92 S.Ct. 495 (leaving to state courts whether, when a plea agreement is breached, to require "specific performance of the agreement on the plea . . . or . . . the opportunity to withdraw [the] plea"). In any event, a sentence to which the parties agree in a plea bargain is not a "prescribed statutory maximum."
In sum, petitioner argues that once the trial court accepted a plea predicated on the plea agreement, it was bound not to exceed the sentence agreed upon, without a trial by jury. But this ignores the thrust of the plea agreement taken as a whole, and finds no support in any of its individual provisions. While the State is unquestionably bound by any plea agreement that induces a plea of guilty or nolo contendere, see generally Santobello, 404 U.S. at 262, 92 S.Ct. 495 (holding that "when a plea rests in any significant degree on a promise or agreement of the prosecutor, so that it can be said to be part of the inducement or consideration, such *57 promise must be fulfilled"), so is the defense. Quarterman, 527 So.2d at 1382. The requirements of Apprendi and Blakely do not come into play because the "prescribed statutory maximum" is not at issue.
The petition for writ of habeas corpus (styled petition for habeas corpus relief) is denied.
BARFIELD and POLSTON, JJ., concur.
NOTES
[1]  If petitioner's view were correct, all conditions in Quarterman plea agreements could lead to jury trials on whether the condition in the plea agreement was violated, including even whether the defendant failed to appear at the sentencing hearing. See generally Quarterman v. State, 527 So.2d 1380, 1381 (Fla.1988). Plea bargains are designed to avoid, not to foment jury trials. See Santobello v. New York, 404 U.S. 257, 260, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971) (noting that, if all criminal cases were tried, "the States and the Federal Government would need to multiply by many times the number of judges and court facilities"). If a trial must take place, moreover, some might argue that it would be preferable to try the offense charged, instead of a tangential question which does not affect the statutorily prescribed maximum sentence to which a defendant is subject.
[2]  In the plea agreement, the petitioner agreed to be sentenced as an habitual offender. At sentencing, however, the State withdrew the notice of intent to classify the petitioner as an habitual offender.
[3]  The petitioner does not (and did not below) seek to withdraw his plea. He is seeking specific performance.
