
400 So.2d 1238 (1981)
Freddie Lewis LEE, Appellant,
v.
STATE of Florida, Appellee.
No. UU-227.
District Court of Appeal of Florida, First District.
June 1, 1981.
Rehearing Denied August 3, 1981.
Michael Allen, Public Defender and Carl S. McGinnes, Asst. Public Defender, for appellant.
Jim Smith, Atty. Gen., Raymond L. Marky and David P. Gauldin, Asst. Attys. Gen., for appellee.
PER CURIAM.
This cause is before us on appeal from a judgment of guilty of attempted robbery with a firearm entered on a jury verdict, and from a sentence imposed of three to forty years in prison. Appellant correctly urges that, under Florida Statutes, Sections 812.13(2)(a) and 777.04(4)(b) (1979), attempted robbery with a firearm is a second degree felony for which the maximum penalty is fifteen years in prison. Florida Statutes, Section 775.082(3)(c) (1979). The enhanced penalty statute, Florida Statutes, Section 775.087 (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). Other contentions raised on appeal are without merit.
Accordingly, the sentence is VACATED and the cause REMANDED for resentencing in accordance herewith.
McCORD, BOOTH and SHIVERS, JJ., concur.
