
574 S.W.2d 104 (1978)
Ex parte Frank G. ABBEY, Jr.
No. 58266.
Court of Criminal Appeals of Texas, Panel No. 3.
December 6, 1978.
*105 Before ROBERTS, ODOM and TOM G. DAVIS, JJ.

OPINION
ROBERTS, Judge.
This is a post-conviction habeas corpus application. See Art. 11.07, Vernon's Ann. C.C.P. Petitioner contends that the information in this case is fundamentally defective.[1] The trial court agrees with this contention and recommends that relief be granted on this basis. We hold that the information fails to allege a necessary element of the offense charged and is therefore fundamentally defective. Accordingly, we grant the requested relief.
Omitting the formal parts, the information reads as follows:
"... on or about the 11th day of September, 1977, Frank G. Abbey, Jr., hereinafter styled Defendant, did then and there in the County and State aforesaid, did then and there after committing an offense of forgery, a felony, did then and there intentionally and knowingly escape from a penal institution, to-wit: the Kerr County Jail."
Petitioner was charged with escape as defined by V.T.C.A., Penal Code 38.07, which reads:
"(a) A person arrested for, charged with, or convicted of an offense commits an offense if he escapes from custody.
"(b) Except as provided in Subsections (c) and (d) of this section, an offense under this section is a Class A misdemeanor.
"(c) An offense under this section is a felony of the third degree if the actor:
"(1) is under arrest for, charged with, or convicted of a felony; or
"(2) is confined in a penal institution.
"(d) An offense under this section is a felony of the second degree if the actor used or threatened to use a deadly weapon to effect his escape." (Emphasis added)
As the statute makes clear, escape is generally defined in subsection (a). Subsection (c) makes escape a third degree felony in two specific situations, while subsection (d) *106 provides that escape is a second degree felony whenever one uses or threatens to use a deadly weapon. Subsection (b) provides that escape is a class A misdemeanor in all cases except those described in subsections (c) and (d).
Construing the statute as a whole,[2] it is clear that escape is a misdemeanor under subsection (b) when one escapes from custody after having been arrested for, charged with, or convicted of a misdemeanor. Subsection (c) makes one guilty of a third degree felony if he (1) escapes from custody after having been arrested for, charged with, or convicted of a felony or (2) escapes from a penal institution after having been arrested for, charged with, or convicted of any offense, whether it be a felony or a misdemeanor. Finally, one is guilty of escape as a second degree felony if he escapes from custody after having been arrested for, charged with, or convicted of a felony or a misdemeanor and he uses or threatens to use a deadly weapon.
Thus, an essential element of all forms of escape is the general requirement of subsection (a)that one have been arrested for, charged with, or convicted of an offense. Garcia v. State, 537 S.W.2d 930, 932 (Tex.Cr.App.1976); Booker v. State, 523 S.W.2d 413, 414 (Tex.Cr.App.1975). Since the information in the present case failed to allege this necessary element, it is fundamentally defective. Ex Parte Cannon, 546 S.W.2d 266 (Tex.Cr.App.1976).
Accordingly, the relief requested is granted and the prosecution under this information is ordered dismissed.
NOTES
[1]  Petitioner waived indictment. See Art. 1.141, V.A.C.C.P.
[2]  See Ex Parte Cannon, 546 S.W.2d 266, 272-274 (Tex.Cr.App.1976) (opinion on State's motion for rehearing).
