
502 So.2d 1344 (1987)
Ronald C. GASKINS, Appellant,
v.
STATE of Florida, Appellee.
No. 85-2829.
District Court of Appeal of Florida, Second District.
February 25, 1987.
*1345 James Marion Moorman, Public Defender, Bartow and Brad Permar, Asst. Public Defender, Clearwater, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee and Robert J. Landry, Asst. Atty. Gen., Tampa, for appellee.
RYDER, Acting Chief Judge.
On February 26, 1980, Ronald Gaskins was charged with grand theft in violation of section 812.014, Florida Statutes (1979), and with using a firearm in the commission of a felony in violation of section 790.07, Florida Statutes (1979). On April 16, 1980, a jury found Gaskins guilty of grand theft and not guilty of using a firearm in the commission of a felony.
Prior to sentencing, the state produced documents reflecting Gaskins' prior record and requested that Gaskins be sentenced as a habitual offender. At sentencing, on June 5, 1980, the trial judge found Gaskins to be a habitual offender and a threat to the community and safety of its citizens. The trial judge sentenced Gaskins to fifteen years on the grand theft conviction and enhanced the sentence another fifteen years. The trial judge "retained jurisdiction on this defendant."
On June 5, 1980, Gaskins filed a timely notice of appeal with this court. He raised two points on appeal. First, he alleged that the "trial court erred in denying appellant's motion to suppress the pretrial photopack identification and the in-court identification of appellant". Second, he alleged that the "trial court erred in sentencing appellant as a habitual offender". We affirmed his judgment and sentence. Gaskins v. State, 399 So.2d 138 (Fla. 2d DCA 1981).
On July 23, 1985, Gaskins filed a pro se motion to correct sentence with the Circuit Court of the Sixth Judicial Circuit in and for Pinellas County. He alleged that the trial judge erroneously retained jurisdiction, did not specify with particularity the reasons for retaining jurisdiction, and that neither grand theft nor the habitual offender statute was one of the enumerated crimes for which the court could retain jurisdiction. The trial judge granted the motion and stated that while the Gaskins' judgment and sentence "may have been inartfully drafted ... it reflects the intent of the Court ... to sentence the Defendant to a period of incarceration of thirty years." The trial judge issued an order providing that:
It is further considered, Ordered and Adjudged that the Defendant is found to be a habitual offender and is committed to the custody of the Department of Corrections for an enhanced term of thirty years, less the time spent in the St. Petersburg Jail and the County Jails of Pinellas County and Hillsborough, Florida, to wit: 113 days.
It is further considered and ordered that this Court does retain jurisdiction on this Defendant.
Gaskins appeals from the trial judge's order readjudging him a habitual offender *1346 and sentencing him to thirty years in prison, less the time already spent in jail. Gaskins raises two points on appeal. First, he argues that the trial judge unlawfully retained jurisdiction over his sentence. Second, he alleges that the trial judge unlawfully habitualized his sentence for grand theft. We deal with each in point of order.
Section 947.16(3), Florida Statutes (1979), enumerated certain offenses upon conviction of which a defendant could be subject to retention of jurisdiction. Section 947.16(3) provided, in pertinent part, that:
Persons who have become eligible for parole and who may, according to the objective parole guidelines of the commission, be granted parole shall be placed on parole in accordance with the provisions of this law; except that, in any case of a person convicted of murder, robbery, aggravated assault, aggravated battery, kidnapping, sexual battery or attempted sexual battery, incest, or attempted incest, an unnatural and lascivious act, or an attempted unnatural and lascivious act, lewd and lascivious behavior, assault or aggravated assault when a sexual act is completed or attempted, battery or aggravated battery when a sexual act is completed or attempted, arson, or any felony involving the use of a firearm or other deadly weapon or the use of intentional violence, at the time of sentencing the judge may enter an order retaining jurisdiction over the offender for review of a commission release order. This jurisdiction of the trial judge is limited to the first third of the maximum sentence imposed.
Grand theft is not among the enumerated offenses for which retention of jurisdiction is allowed. Consequently, the trial judge improperly retained jurisdiction over Gaskins' sentence. Accordingly, we strike the retention of jurisdiction.
In the second order, the court gave credit for time served in county jail of 113 days but did not give credit for the five years Gaskins served in state prison. If uncorrected, the order will result in an increased sentence. Accordingly, we instruct the trial judge to give credit for all time served.
Gaskins' second contention is that the trial court erred in sentencing him as a habitual offender. Gaskins previously challenged his habitualized sentence in Gaskins v. State, 399 So.2d 138 (Fla. 2d DCA 1981). We affirmed his sentence. The law of the case precludes relitigation of all issues necessarily ruled upon by the court, as well as all issues upon which appeal could have been taken, but which were not appealed. State v. Stabile, 443 So.2d 398 (Fla. 4th DCA 1984). A per curiam affirmance establishes the law of the case. State Commission on Ethics v. Sullivan, 430 So.2d 928 (Fla. 1st DCA 1983). Consequently, the law of the case established in Gaskins' previous appeal precludes relitigation of Gaskins' habitualized sentence.
Whitehead v. State, 498 So.2d 863 (Fla. 1986), does not affect Gaskins' habitualized sentence. Gaskins was convicted and sentenced in 1980. The guidelines did not become effective until October of 1983. Whitehead only pertains to departures from the sentencing guidelines. Whitehead did not repeal section 775.084, Florida Statutes (1985). Winters v. State, 500 So.2d 303 (Fla. 1st DCA 1986).
Affirmed in part; reversed and remanded with instructions to strike retention of jurisdiction and to give full credit for all time served.
LEHAN and FRANK, JJ., concur.
