Phillip W. Trott makes his return engagement to this court.1 On his first appearance, he contended, successfully, that it was error to sentence him as though he was an habitual violent felony offender. We agreed that his negotiated plea only justified habitual offender (not habitual violent felony offender) treatment and, in any event, that the Texas conviction did not meet the statutory definition of an habitual violent felony offender. Therefore, we held that the sentence as agreed to was illegal and, remanded to remove the mandatory fifteen-year portion of the sentence.
Now Trott urges that since the supreme court in State v. Johnson, 616 So.2d 1 (Fla. 1993), held that the statute permitting an out-of-state conviction to be counted as one of the qualifying convictions for habitual offender consideration was, for the relevant time period, unconstitutional, any habitual offender treatment for him would be illegal. He, therefore, suggests that we must remand so that he can be properly sentenced under the guidelines. He must mean within the guideline range.
We find that Trott was properly sentenced under his agreement and affirm the trial court. In order to limit a potentially much greater sentence, Trott agreed to be sentenced to “a guideline sentence with habitual offender treatment.” In other words, he agreed to be sentenced in excess of the guideline range. Such an agreement is legal. Quarterman v. State, 527 So.2d 1380 (Fla. 1988). His earlier sentence was illegal, not because it exceeded the guideline range, but because it imposed a mandatory term only justified by habitual violent felony treatment which he did not agree to and for which he was not qualified.
The twenty-seven-year sentence imposed in this case, although it exceeds the guideline range, is within the statutory maximum authorized for the offense involved. It is a legal sentence; it was agreed to and it is affirmed.
AFFIRMED.
DAUKSCH and GOSHORN, JJ., concur.. See Trott v. State, 579 So.2d 807 (Fla. 5th DCA 1991).