
403 So.2d 593 (1981)
James A. POOLEY, Sr., Appellant,
v.
STATE of Florida, Appellee.
No. YY-66.
District Court of Appeal of Florida, First District.
September 14, 1981.
*594 Carl S. McGinnes, Asst. Public Defender, for appellant.
Jim Smith, Atty. Gen., David P. Gauldin, Asst. Atty. Gen., for appellee.
SHIVERS, Judge.
We affirm appellant's judgments of conviction for attempted robbery with a firearm and possession of a firearm by a convicted felony. However, we reverse appellant's life sentence for attempted robbery with a firearm.
On September 5, 1980, the trial court sentenced appellant to five years in prison for attempted robbery with a firearm and to a consecutive five year term for possession of a firearm by a convicted felon, and committed him to the custody of the sheriff. Later that day, the trial court, on its own motion called appellant back before the court and announced that it had mistakenly thought that appellant was to have been sentenced for a third degree felony on the attempted robbery conviction at the previous sentencing. The court then stated it intended to resentence appellant to life in prison, explaining that attempted robbery with a firearm was a first degree felony and that life in prison was the maximum punishment for a first degree felony. However, because appellant's chief trial counsel was unavailable, the court set aside defendant's attempted robbery sentence and granted a motion for continuance until September 12, 1980. At the resentencing hearing, the trial court sentenced defendant to life in prison for attempted robbery with a firearm over objections that the new sentence was excessive and violated the double jeopardy prohibition.
Contrary to the trial court's interpretation, Section 812.13(2)(a) and Section 777.04(4)(b), Florida Statutes (1979), classifies attempted robbery with a firearm as a second degree felony for which the maximum punishment is fifteen years in prison. Section 775.082(3)(c), Florida Statutes (1979); Lee v. State, 400 So.2d 1238 (Fla. 1st DCA June 1, 1981); Arthur v. State, 391 So.2d 338 (Fla. 4th DCA 1980); Whidden v. State, 374 So.2d 543 (Fla. 2d DCA 1979). The enhanced penalty statute, Section 775.087, Florida Statutes (1979), does not apply when the use of a firearm is an essential element of the offense. Crook v. State, 385 So.2d 1136, 1138 (Fla. 1st DCA 1980). Consequently, appellant's current life sentence for attempted robbery with a firearm is illegal.
The trial court further erred in initially sentencing appellant to five years for attempted robbery with a firearm and then, after appellant began serving his sentence, setting aside the five year sentence and imposing a life sentence. Once a sentence has been imposed by the court and the defendant has begun serving that sentence, it is a violation of the defendant's constitutional guaranty against being twice placed into jeopardy for the court to resentence the defendant to an increased period of incarceration. Troupe v. Rowe, 283 So.2d 857 (Fla. 1973); Flowers v. State, 351 So.2d 387 *595 (Fla. 1st DCA 1977); Andrews v. State, 357 So.2d 489 (Fla. 1st DCA 1978). The trial court was therefore without authority to set aside appellant's prior sentence and impose a new, increased sentence.
Accordingly, appellant's judgments of conviction and his five year sentence for possession of a firearm by a convicted felon are affirmed. Appellant's life sentence for attempted robbery with a firearm is vacated and the cause remanded to the trial court with directions to impose a sentence of five years with credit for 183 days jail time.
AFFIRMED in part, REVERSED in part, and REMANDED.
McCORD, J., and WOODIE A. LILES (Ret.), Associate Judge, concur.
