(a) Except as otherwise provided in this section, a person who violates a provision of §§ 5–602 through 5–606 of this subtitle with respect to any of the following controlled dangerous substances is guilty of a felony and on conviction is subject to imprisonment not exceeding 20 years or a fine not exceeding $15,000 or both:
(1) phencyclidine;
(2) 1–(1–phenylcyclohexyl) piperidine;
(3) 1–phenylcyclohexylamine;
(4) 1–piperidinocyclohexanecarbonitrile;
(5) N–ethyl–1–phenylcyclohexylamine;
(6) 1–(1–phenylcyclohexyl)–pyrrolidine;
(7) 1–(1–(2–thienyl)–cyclohexyl)–piperidine;
(8) lysergic acid diethylamide; or
(9) 750 grams or more of 3, 4–methylenedioxymethamphetamine (MDMA).
(b) A person who is convicted under subsection (a) of this section or of conspiracy to commit a crime included in subsection (a) of this section is subject to imprisonment not exceeding 20 years or a fine not exceeding $15,000 or both if the person previously has been convicted once:
(1) under subsection (a) of this section or § 5–608 of this subtitle;
(2) of conspiracy to commit a crime included in subsection (a) of this section or § 5–608 of this subtitle;
(3) of a crime under the laws of another state or the United States that would be a crime included in subsection (a) of this section or § 5–608 of this subtitle if committed in this State; or
(4) of any combination of these crimes.
(c) (1) A person who is convicted under subsection (a) of this section or of conspiracy to commit a crime included in subsection (a) of this section is subject to imprisonment not exceeding 25 years or a fine not exceeding $25,000 or both if the person previously:
(i) has served at least one term of confinement of at least 180 days in a correctional institution as a result of a conviction under subsection (a) of this section, § 5–608 of this subtitle, or § 5–614 of this subtitle; and
(ii) if the convictions do not arise from a single incident, has been convicted twice:
1. under subsection (a) of this section or § 5–608 of this subtitle;
2. of conspiracy to commit a crime included in subsection (a) of this section or § 5–608 of this subtitle;
3. of a crime under the laws of another state or the United States that would be a crime included in subsection (a) of this section or § 5–608 of this subtitle if committed in this State; or
4. of any combination of these crimes.
(2) A separate occasion is one in which the second or succeeding crime is committed after there has been a charging document filed for the preceding crime.
(d) A person who is convicted under subsection (a) of this section or of conspiracy to commit a crime included in subsection (a) of this section is subject to imprisonment not exceeding 40 years or a fine not exceeding $25,000 or both if the person previously has served three separate terms of confinement as a result of three separate convictions:
(1) under subsection (a) of this section or § 5–608 of this subtitle;
(2) of conspiracy to commit a crime included in subsection (a) of this section or § 5–608 of this subtitle;
(3) of a crime under the laws of another state or the United States that would be a crime included in subsection (a) of this section or § 5–608 of this subtitle if committed in this State; or
(4) of any combination of these crimes.
(e) A person convicted under subsection (a) of this section or of conspiracy to commit a crime included in subsection (a) of this section is not prohibited from participating in a drug treatment program under § 8–507 of the Health – General Article because of the length of the sentence.