The State of Alabama filed this petition for a writ of mandamus directing Judge Johnny Hardwick to rescind his order allowing R.R.A. to be considered for treatment under the youthful offender act (hereinafter referred to as the “YOA”). R.R.A. was indicted for theft of property for allegedly stealing money, an amount totaling $53,443, from Max Federal Credit Union while he was employed at Max Federal Credit Union as an items processing clerk. R.R.A. turned 21 years old on February 5, 2001. The acts occurred between December 11, 2000, and May 17, 2001. The acts began when R.R.A. was under the age of 21 but ended after R.R.A. celebrated his twenty-first birthday. R.R.A. applied for consideration under the YOA. Judge Hardwick held that because R.R.A. was under 21 years of age at the time that the acts forming the basis of the charge began he would consider R.R.A.’s application for treatment under the YOA. The State, arguing that the acts constituted a continuing offense and that R.R.A. did not complete the offense until after he reached the age of majority, objected. After failing to obtain relief in the circuit court, the *43State filed this petition for a writ of mandamus.
The indictment against R.R.A. charged as follows:
“The Grand Jury of said County charge that, before the finding of this indictment, [R.R.A.], whose name is otherwise unknown to the Grand Jury, did knowingly obtain by deception control over lawful currency and/or coinage of the United States of America, a better description of which is unknown to the Grand Jury, of some value greater than $1,000.00, the property of MAX Federal Credit Union, a government regulated corporation, with intent to deprive the owner of the property, in violation of Section 13A-8-3 of the Code of Alabama.”
R.R.A. was charged with theft by deception. A person commits the crime of theft by deception when he/she “[k]nowingly obtains by deception control over the property of another, with intent to deprive the owner of his property.” See § 13A-8-2(2), Ala.Code 1975.
The State argues in its petition that the offense was a continuing offense and that it was not completed until after R.R.A. reached the age of 21; therefore, the State says, he was not eligible for treatment under the YOA. R.R.A. states in his answer to the petition that there is no binding precedent governing this issue but that it is clear that the Legislature intended that the YOA apply to those individuals charged with crimes that are commenced when the person is in his minority. R.R.A. does not respond to the State’s contention that the offense charged in this ease was a continuing offense.
The Alabama Supreme Court in Griffin v. State, 352 So.2d 847 (Ala.1977), had occasion to determine whether a charge under Tit. 15, § 209 (Recomp.1958), obtaining property by false pretenses, was a continuing offense. The Court stated the following:
“It is settled that an offense may be of a continuing nature. Where the acts, when consolidated, constitute but one offense, that crime should be the one with which the accused is charged.... Similarly, if several acts form but one element of an offense, the offense is not complete until the last of such acts has been performed....
“In the case at bar, the false representation that there were no encumbrances upon the property was made several times. The objective of these representations was to obtain the purchase price of the residence. The payment of the first check was merely partial payment. The representation was repeated and more funds were obtained. Both payments were part of the same transaction.”
352 So.2d at 850. See also State v. Steele, 502 So.2d 874 (Ala.Crim.App.1987), and Home v. State, 453 So.2d 1068 (Ala.Crim.App.1983), rev’d on other grounds, 453 So.2d 1070 (Ala.1984). The former crime of obtaining property by false pretenses is substantially similar to the offense of theft by deception.
Applying the rationale of the Griffin Court, we believe that the crime for which R.R.A. was charged was a continuing offense that started in December 2000 and ended in May 2001. The several acts of theft alleged to have been committed by R.R.A. were part of an overall scheme to steal over $1,000 from Max Federal Credit Union. According to Griffin the offense was not completed until the date of the last act to obtain unauthorized control over the credit union’s money — a date that all parties agree occurred after R.R.A.’s twenty-first birthday.
*44Section 15-19-1(a), Ala.Code 1975, provides that an individual is eligible for treatment under the YOA if, “[he is] charged with a crime which was committed in his minority” (emphasis added). “A crime is committed only when all of its essential elements are present and complete.” Griffin, 352 So.2d at 850, citing Pendergast v. United States, 317 U.S. 412, 63 S.Ct. 268, 87 L.Ed. 368 (1943) (emphasis added). All of the elements of the offense charged in the indictment were not completed until after R.R.A. celebrated his twenty-first birthday.
Therefore, according to prior caselaw and § 15-19-1, Ala.Code 1975, R.R.A. was not eligible for treatment under the YOA. Judge Hardwick’s ruling was erroneous. The State has established all of the prerequisites for the issuance of this writ. Therefore, this petition is due to be, and is hereby, granted.
PETITION GRANTED.
McMILLAN, PH., and BASCHAB and SHAW, JJ., concur; COBB, J., dissents; WISE, J., recuses herself.