; or (ii) to protect public health and safety. (2) Federal law Notwithstanding any other provision of law, the provisions of this title as applied to marijuana, except the provisions described in subsection (d) and except as provided in subsection (e), shall not apply to any person engaged in marijuana transportation or shipment between two States which States permit, as applicable, the manufacture, production, possession, distribution, dispensation, administration, or delivery of marijuana. (d) Provisions described The provisions described in this subsection are— (1) section 401(a)(1), with respect to a violation of section 409 or 418; (2) section 409; (3) section 417; and (4) section 418. (e) Exception Subsections (a) through (c) shall not apply to any person who— (1) violates this title with respect to any controlled substance other than marijuana; (2) knowingly or intentionally manufactures, produces, possesses, distributes, dispenses, administers, or delivers any marijuana in violation of the laws of the State or Indian Tribe in which such manufacture, production, possession, distribution, dispensation, administration, or delivery occurs