In the case of every felony, every principal in the second degree and every accessory before the fact may be indicted, tried, convicted and punished in all respects as if a principal in the first degree; provided, however, that except in the case of a killing for hire under the provisions of subdivision A 2 of § 18.2-31 or a killing pursuant to the direction or order of one who is engaged in a continuing criminal enterprise under the provisions of subdivision A 10 of § 18.2-31 or a killing pursuant to the direction or order of one who is engaged in the commission of or attempted commission of an act of terrorism under the provisions of subdivision A 13 of § 18.2-31, an accessory before the fact or principal in the second degree to an aggravated murder shall be indicted, tried, convicted and punished as though the offense were murder in the first degree.
Va. Code § 18.2-18