We granted Alfred Timmons’ petition for writ of certiorari to consider the Court of Appeals’ determination that possession of cocaine is a lesser included offense of possession of crack cocaine. We affirm.
FACTS/PROCEDURAL HISTORY
Petitioner (“Timmons”) was indicted for shoplifting, fifteenth offense, and possession of crack cocaine after police arrested him in the parking lot of a K-Mart store. A search of his person revealed that Timmons had two telephones in his pants, and accessories for the phones in his socks. He also had .02 grams of crack cocaine in his pocket.
Timmons pled guilty to shoplifting, fifteenth offense, and possession of cocaine. The court sentenced him to eight years, and two years, respectively. The sentences were concurrent. At the plea hearing, the solicitor explained that although an analysis of the substance found on Timmons was positive for crack cocaine, the State was accepting Timmons’ guilty plea to possession of cocaine, as opposed to possession of crack cocaine, based on the minute amount of drugs involved.
Timmons appealed, arguing the trial court lacked subject matter jurisdiction to accept his plea to possession of cocaine where the indictment charged possession of crack cocaine.1 The Court of Appeals affirmed and held that possession of cocaine is a lesser included offense of possession of crack cocaine. State v. Timmons, 338 S.C. 287, 525 S.E.2d 906 (1999).
ISSUE
Did the trial court have subject matter jurisdiction to accept Timmons’ plea to possession of cocaine?
*392 ANALYSIS
The circuit court does not have subject matter jurisdiction to convict a defendant, of an offense unless there has been an indictment which sufficiently states the offense; the defendant has waived presentment of the indictment; or the offense is a lesser included offense of the crime charged in the indictment. State v. Elliott, 346 S.C. 603, 552 S.E.2d 727 (2001).
The test for determining if a crime is a lesser included offense is whether the greater of the two offenses includes all the elements of the lesser offense. State v. McFadden, 342 S.C. 629, 632, 539 S.E.2d 387, 389 (2000). That test2 is met here.
South Carolina Code Annotated Section 44-53-370(c) (2002) makes it illegal for any person to knowingly or intentionally possess a “controlled substance.” The statutory definition of “controlled substance” includes “[c]oca leaves and any salt, compound, derivative, or preparation of coca leaves, and any salt, compound, derivative, or preparation thereof which is chemically equivalent or identical with any of these substances____” S.C.Code Ann. § 44-53-210(b)(4) (2002). S.C.Code Ann. § 44-53-110 (2002), defines “crack cocaine” as “an alkaloidal cocaine or freebase form of cocaine, which is the end product of a chemical alteration whereby the cocaine in salt form is converted to a form suitable for smoking.” Section 44-53-375 of the South Carolina Code provides harsher penalties for a defendant convicted of possession of crack cocaine than those provided in § 44-53-370 for possession of cocaine.
Construing the code sections cited above, before the State obtains a conviction for possession of crack cocaine it must prove that the defendant (1) knowingly or intentionally (2) possessed (3) a form of cocaine (4) in a smokable, alkaloidal state. A conviction for possession of cocaine'only requires that the State prove the first three of these elements. Possession of cocaine, then, does not contain any element not included within possession of crack cocaine. Thus, it satisfies the *393elements test as a lesser included offense of possession of crack cocaine.
Moreover, there is precedent from this Court suggesting possession of cocaine is a lesser included offense of possession of crack cocaine. In State v. Jackson, 297 S.C. 523, 377 S.E.2d 570 (1989), the defendant was indicted for possession of crack cocaine after police found him in possession of a glass vial containing a substance resembling crack cocaine. At trial a SLED chemist testified that, because of the small amount retrieved, he could not determine whether the substance was crack cocaine. The chemist testified, however, that the substance tested positive for cocaine. The trial court granted the defendant’s motion for a directed verdict of not guilty on the charge of possession of crack cocaine. The court submitted the offense of possession of cocaine to the jury, determining possession of cocaine was a lesser included offense of possession of crack cocaine. The jury found the defendant guilty of possession of cocaine. The defendant appealed, asserting the trial court’s jmy charge impermissibly commented on the facts of the case.
We affirmed the conviction, concluding the judge’s remarks were an explanation of his ruling on the defendant’s directed verdict motion, rather than a comment on the facts of the case. We continued:
Th[e court’s] statement explained how and why the charge of possession was being reduced from crack cocaine to simple cocaine. According to the chemist’s testimony, there was an insufficient amount of the substance to conduct an analysis for crack cocaine. Without any evidence of crack cocaine, Jackson could not be charged with that offense on the indictment in question. In contrast, there was testimony that there was a sufficient amount of the substance to conduct an analysis of cocaine. This explains how Jackson could be charged with the lesser included offense.
Id. at 526, 377 S.E.2d at 572 (emphasis supplied). While Jackson did not challenge on appeal the trial court’s subject matter jurisdiction, Jackson clearly suggests possession of cocaine is a lesser included offense of possession of crack.
*394 CONCLUSION
We affirm the result reached by the Court of Appeals. Pursuant to the elements test and State v. Jackson, supra, possession of cocaine is a lesser included offense of possession of crack cocaine. It follows that the indictment charging Timmons with possession of crack cocaine conferred upon the trial court subject matter jurisdiction to accept Timmons’ plea of guilty to possession of cocaine. AFFIRMED.
TOAL, C.J., MOORE, WALLER and BURNETT, JJ., concur.