
438 So.2d 108 (1983)
Vincent B. WILSON, Appellant,
v.
STATE of Florida, Appellee.
No. AO-145.
District Court of Appeal of Florida, First District.
September 12, 1983.
Rehearing Denied October 10, 1983.
Terry P. Lewis, Sp. Asst. Public Defender, Tallahassee, for appellant.
Jim Smith, Atty. Gen., and John W. Tiedemann, Asst. Atty. Gen., Tallahassee, for appellee.
ZEHMER, Judge.
Appellant was charged with burglary of a dwelling and possession of a firearm during the burglary in violation of § 810.02 and § 775.087(2), Florida Statutes (1981). Following his nolo contendere plea, appellant was adjudged a youthful offender under Chapter 958, Florida Statutes (1981), and sentenced to three years minimum mandatory imprisonment in accordance with § 775.087(2).[1] Appellant complains on this appeal that the trial court illegally imposed the three-year mandatory sentence in view of the circumstances involved. We agree.
The factual basis underlying appellant's plea and the sentence imposed was recited by the prosecuting attorney as follows:
Your Honor, the facts would disclose that sometime between the 18th and 19th, over the evening of those days, the 18th and 19th of November, 1981, the dwelling owned by Robert McCreary, which is located at 2208 Pontiac Drive here in Tallahassee, Leon County, Florida, was burglarized by Mr. Vincent Bernard Wilson and Shelton McKinney; that while in the commission of this burglary, a .38-caliber pistol was stolen belonging to Mr. McCreary and that this.38-caliber pistol was taken by Vincent Bernard Wilson. *109 On the 20th of November, Detective Gavern David of the Tallahassee Police Department and Detective Franklin of the Leon County Sheriff's Office served a search warrant on the Defendant's home, which was located at 1010 Saxon Street here in Tallahassee. And that search revealed  as a result of the search, they found the .38-caliber pistol belonging to Mr. McCreary in the possession of Mr. Vincent Bernard Wilson.
The trial court having just sentenced appellant as a youthful offender in two other pending cases, the court and counsel discussed the fact that whether to do likewise in this case was entirely discretionary with the court.[2] After the state announced it had no objection to so treating appellant in this case also, the trial court adjudged appellant a youthful offender and proceeded to sentence him, over a somewhat ambiguous objection by appellant's counsel, to three years minimum mandatory imprisonment pursuant to § 775.087(2), to run concurrently with the sentences of imprisonment imposed in the other two cases. This appeal followed.
Appellant argues that the facts recited are not legally sufficient to authorize imposition of the three-year mandatory sentence under § 775.087(2), citing Sanders v. State, 352 So.2d 1187 (Fla. 1st DCA 1977), cert. denied, 362 So.2d 1056 (Fla. 1978), and Wilson v. State, 378 So.2d 1258 (Fla. 1st DCA 1979), quashed on other grounds, 395 So.2d 520 (Fla. 1981).
In Sanders, supra, the defendant was found guilty of burglary of a dwelling while armed with a firearm and theft of the same firearm. He was sentenced to a mandatory three-year minimum term pursuant to § 810.02 and § 775.087(2). On appeal, his conviction of burglary of a dwelling was affirmed; however, the case was remanded for resentencing because the evidence was held insufficient to support the jury's finding that defendant was armed with a dangerous weapon during the course of the burglary. The court reasoned that the "mere showing of theft of a gun after entering a structure, standing alone, is insufficient to prove burglary armed with a dangerous weapon." 352 So.2d at 1188.
Similarly, in Wilson, supra, it was stated:
The allegations in the information track the language of Section 810.02(2)(b), Florida Statutes (1977), alleging that appellant committed burglary of a dwelling and, while doing so, he `armed himself therein with a dangerous weapon ... a firearm . ..'. However, the underlying factual basis for the plea, recited at the arraignment, shows only that the defendant committed the theft of a firearm while inside the house he was alleged to have burgled. We stated in Sanders v. State, 352 So.2d 1187, 1188 (Fla. 1st DCA 1977), that `the mere showing of theft of a gun after entering a structure, standing alone, is insufficient to establish burglary armed with a dangerous weapon.' If appellant cannot be convicted of first degree burglary, under the facts, it is questionable whether the mandatory minimum sentence would apply to any lesser degree of burglary.
(378 So.2d at 1260)
The facts described to the trial court at the hearing in this case show only that appellant stole the gun during the burglary and that the gun was later found in appellant's home during a search. The state failed to indicate that any facts existed, such as whether the gun was loaded at the time of the burglary or whether appellant possessed both the gun and ammunition during the burglary, which were similar to the circumstances held sufficient to sustain imposition of the three-year mandatory minimum sentence in Mills v. State, 400 So.2d 516 (Fla. 5th DCA 1981), Fowler v. State, 375 So.2d 879 (Fla. 2d DCA 1979), and State v. Dopson, 323 So.2d 644 (Fla. 4th DCA 1976). Accordingly, this case is governed by our decisions in Sanders and Wilson.
In addition, on our own initiative, we also find it necessary to address the *110 fundamental error[3] in the trial court's having sentenced appellant to three years mandatory imprisonment under § 775.087(2) after adjudging him a youthful offender pursuant to Chapter 958. Even though it was absolutely discretionary with the trial court whether to adjudge appellant a youthful offender, once the court determined to do so, it was error to impose the three-year mandatory sentence under § 775.087(2) because of the provisions in § 958.021 and § 958.05, Florida Statutes (1981). Whitlock v. State, 404 So.2d 795 (Fla. 3d DCA 1981); Patterson v. State, 408 So.2d 785 (Fla. 2d DCA 1982); Cochran v. State, 410 So.2d 595 (Fla. 2d DCA 1982).
For the foregoing reasons, we reverse and vacate the sentence. The case is remanded for resentencing of appellant consistent with this opinion.
ROBERT P. SMITH, Jr. and WENTWORTH, JJ., concur.
NOTES
[1]  Section 775.087(2) provides in part:

Any person who is convicted of any ... burglary . .. and who had in his possession a `firearm,' as defined in subsection 790.001(6) ... shall be sentenced to a minimum term of imprisonment of three calendar years. Notwithstanding the provisions of s. 948.01, adjudication of guilt or imposition of sentence shall not be suspended, deferred, or withheld, nor shall the defendant be eligible for parole or statutory gain-time under s. 944.27 or s. 944.29, prior to serving such minimum sentence.
[2]  Section 958.04, Florida Statutes (1981).
[3]  See Alexander v. State, 418 So.2d 432 (Fla. 3d DCA 1982); Muszynski v. State, 392 So.2d 63 (Fla. 5th DCA 1981); Cunningham v. State, 385 So.2d 721 (Fla. 3d DCA 1980); Kohn v. State, 289 So.2d 48 (Fla. 3d DCA 1973); Hutchins v. State, 286 So.2d 244 (Fla. 3d DCA 1973); Williams v. State, 280 So.2d 518 (Fla. 3d DCA 1973).
