§ 18.2-248. Manufacturing, selling, giving, distributing, or possessing with intent to manufacture, sell, give, or distribute a controlled substance or an imitation controlled substance prohibited; penalties.

A. Except as authorized in the Drug Control Act (§ 54.1-3400 et seq.), it shall be unlawful for any person to manufacture, sell, give, distribute, or possess with intent to manufacture, sell, give or distribute a controlled substance or an imitation controlled substance.

B. In determining whether any person intends to manufacture, sell, give or distribute an imitation controlled substance, the court may consider, in addition to all other relevant evidence, whether any distribution or attempted distribution of such pill, capsule, tablet or substance in any other form whatsoever included an exchange of or a demand for money or other property as consideration, and, if so, whether the amount of such consideration was substantially greater than the reasonable value of such pill, capsule, tablet or substance in any other form whatsoever, considering the actual chemical composition of such pill, capsule, tablet or substance in any other form whatsoever and, where applicable, the price at which over-the-counter substances of like chemical composition sell.

C. Except as provided in subsection C1, any person who violates this section with respect to a controlled substance classified in Schedule I or II shall upon conviction be imprisoned for not less than five nor more than 40 years and fined not more than $500,000. Upon a second or subsequent conviction of such a violation, any such person may, in the discretion of the court or jury imposing the sentence, be sentenced to imprisonment for life or for any period not less than five years and be fined not more than $500,000.

When a person is convicted of a third or subsequent offense under this subsection and it is alleged in the warrant, indictment or information that he has been before convicted of two or more such offenses or of substantially similar offenses in any other jurisdiction which offenses would be felonies if committed in the Commonwealth and such prior convictions occurred before the date of the offense alleged in the warrant, indictment, or information, he shall be sentenced to imprisonment for life or for a period of not less than five years, five years of which shall be a mandatory minimum term of imprisonment to be served consecutively with any other sentence and he shall be fined not more than $500,000.

Any person who manufactures, sells, gives, distributes or possesses with the intent to manufacture, sell, give, or distribute the following is guilty of a felony punishable by a fine of not more than $1 million and imprisonment for five years to life, five years of which shall be a mandatory minimum term of imprisonment to be served consecutively with any other sentence:

1. 100 grams or more of a mixture or substance containing a detectable amount of heroin;

2. 500 grams or more of a mixture or substance containing a detectable amount of:

a. Coca leaves, except coca leaves and extracts of coca leaves from which cocaine, ecgonine, and derivatives of ecgonine or their salts have been removed;

b. Cocaine, its salts, optical and geometric isomers, and salts of isomers;

c. Ecgonine, its derivatives, their salts, isomers, and salts of isomers; or

d. Any compound, mixture, or preparation that contains any quantity of any of the substances referred to in subdivisions 2a through 2c;

3. 250 grams or more of a mixture or substance described in subdivisions 2a through 2d that contain cocaine base; or

4. 10 grams or more of methamphetamine, its salts, isomers, or salts of its isomers or 20 grams or more of a mixture or substance containing a detectable amount of methamphetamine, its salts, isomers, or salts of its isomers.

The mandatory minimum term of imprisonment to be imposed for a violation of this subsection shall not be applicable if the court finds that:

a. The person does not have a prior conviction for an offense listed in subsection C of § 17.1-805;

b. The person did not use violence or credible threats of violence or possess a firearm or other dangerous weapon in connection with the offense or induce another participant in the offense to do so;

c. The offense did not result in death or serious bodily injury to any person;

d. The person was not an organizer, leader, manager, or supervisor of others in the offense, and was not engaged in a continuing criminal enterprise as defined in subsection I; and

e. Not later than the time of the sentencing hearing, the person has truthfully provided to the Commonwealth all information and evidence the person has concerning the offense or offenses that were part of the same course of conduct or of a common scheme or plan, but the fact that the person has no relevant or useful other information to provide or that the Commonwealth already is aware of the information shall not preclude a determination by the court that the defendant has complied with this requirement.

C1. Any person who violates this section with respect to the manufacturing of methamphetamine, its salts, isomers, or salts of its isomers or less than 200 grams of a mixture or substance containing a detectable amount of methamphetamine, its salts, isomers, or salts of its isomers shall, upon conviction, be imprisoned for not less than 10 nor more than 40 years and fined not more than $500,000. Upon a second conviction of such a violation, any such person may, in the discretion of the court or jury imposing the sentence, be sentenced to imprisonment for life or for any period not less than 10 years, and be fined not more than $500,000. When a person is convicted of a third or subsequent offense under this subsection and it is alleged in the warrant, indictment, or information that he has been previously convicted of two or more such offenses or of substantially similar offenses in any other jurisdiction, which offenses would be felonies if committed in the Commonwealth and such prior convictions occurred before the date of the offense alleged in the warrant, indictment, or information, he shall be sentenced to imprisonment for life or for a period not less than 10 years, three years of which shall be a mandatory minimum term of imprisonment to be served consecutively with any other sentence and he shall be fined not more than $500,000. Upon conviction, in addition to any other punishment, a person found guilty of this offense shall be ordered by the court to make restitution, as the court deems appropriate, to any innocent property owner whose property is damaged, destroyed, or otherwise rendered unusable as a result of such methamphetamine production. This restitution may include the person’s or his estate’s estimated or actual expenses associated with cleanup, removal, or repair of the affected property.

D. If such person proves that he gave, distributed or possessed with intent to give or distribute a controlled substance classified in Schedule I or II only as an accommodation to another individual who is not an inmate in a community correctional facility, local correctional facility or state correctional facility as defined in § 53.1-1 or in the custody of an employee thereof, and not with intent to profit thereby from any consideration received or expected nor to induce the recipient or intended recipient of the controlled substance to use or become addicted to or dependent upon such controlled substance, he shall be guilty of a Class 5 felony.

E. If the violation of the provisions of this article consists of the filling by a pharmacist of the prescription of a person authorized under this article to issue the same, which prescription has not been received in writing by the pharmacist prior to the filling thereof, and such written prescription is in fact received by th