States that permit recreational marijuana sales tend to have lower rates of vaping-related hospitalizations, according to data published by the Centers for Disease Control and Prevention (CDC). The CDC has linked vitamin E acetate, an adulterant typically reserved to the black market, to 48 of the 51 hospitalized patients it has examined. Governments have often responded to these contaminations by enacting bans on e-cigarettes and other vaping products, but the CDC data suggest they should take the opposite approach.

As with prohibitions throughout history, these bans are misguided. They would push consumers to black markets, where vaping products are more dangerous. In fact, despite the disproportionate popularity of nicotine vaporizers, of the 1,782 hospitalized patients who were asked what type of product they were using, 80 percent reported use of vaporizers containing THC, the main psychoactive ingredient in marijuana. And due to marijuana's illegality, this figure is likely an underestimate, as patients are likely underreporting THC use to avoid potential prosecution.

The CDC has also found THC in the majority of lung fluid samples it has tested in conjunction with contaminates like vitamin E acetate, coconut oil, and limonene, while acknowledging that THC wouldn't necessarily remain in the lungs. But this strong relationship is not because THC is more dangerous to vaporize than nicotine, but because THC vapor fluids are typically purchased on the black market.

Vaping first emerged in U.S. markets in 2007 as a safer alternative to cigarettes—it provides nicotine without the harmful tar in burned tobacco. Critics cite the possible adverse effects of nicotine, especially for teens, while harm reduction groups point to potential health benefits of vaping over smoking traditional cigarettes and their carcinogenic tar.

Until recently, the consensus supported smokers switching to e-cigarettes. Last March, however, reports of lung illnesses and deaths from vaping began to emerge, with 2,506 hospitalizations and 54 deaths reported to the CDC so far this year. In September, the CDC initially advised consumers of all vaping products to stop use immediately. But at the end of October, CDC Director Robert Redfield warned that THC products, particularly those purchased from "informal sources," seemed to be playing a major role in the lung injury outbreak. Redfield added that users of nicotine e-cigarettes should not return to smoking conventional cigarettes.

The federal government still outlaws recreational marijuana use in every state, as does state law in 39 of the 50 states. This means that THC vaping products are usually purchased in black markets and subject to their dangers.

Strikingly, states that permit recreational marijuana sales are experiencing far fewer lung injuries. Alaska, which voted to legalize recreational marijuana in 2014, did not report a single vaping-related hospitalization until one case surfaced in December. Overall, states with legalized marijuana have reported approximately 6.7 fewer lung injuries per million people than states that have not yet permitted recreational cannabis sales, according to our analysis of CDC data.

There are some outliers among the states permitting recreational marijuana. Despite voting to fully legalize marijuana in 2016, Massachusetts currently has the highest vaping hospitalization rate among legalizing states at about 10 cases per million people. But Massachusetts also only has 33 operating marijuana dispensaries, which implies insufficient access to the legal market. In contrast, the City of Denver has 171 recreational dispensaries alone. Regulations restricting access to legal suppliers correlate with higher rates of vaping hospitalizations, but every state that permits recreational marijuana is still below the average of all states.

There are fewer injuries from vaping in legalized marijuana states because consumers have less need to access the black market for THC vaping products. Potentially dangerous additives like vitamin E acetate have been found almost exclusively in underground vaping products, a danger that fades in states with legal marijuana.

Vapers—like those who use alcohol, recreational drugs, and most products in general—are better off buying products in legal markets, where numerous mechanisms moderate the dangers of risky products. Competition between suppliers leads to safer products, with above-ground firms developing reputations for higher quality products. Legal producers and independent groups like Consumer Reports test products for safety and report this information. And if these mechanisms fail, tort liability can hold legal suppliers accountable.

In underground markets, these mechanisms are absent or less effective. Consumers face greater difficulty finding a competing product if they doubt the quality from any given supplier. They also cannot easily sue for damages without also criminalizing themselves. Sending illegal products to a lab for testing is prohibitively expensive and legally risky for both buyers and sellers. And because they don't compete in an open market with legal protections, sellers of illegal drugs often push products that are adulterated to mask their low purity and increase profit margins. That's why expensive, poppy-derived heroin is so often cut with cheap, synthetic fentanyl, and why THC vape pens on the black market are cut with cheap vitamin E acetate.

Numerous episodes illustrate that driving markets underground via prohibition or overregulation means riskier products. Prohibition in the 1920s caused thousands of alcohol poisonings from tainted or mislabeled alcohol. Heroin prohibition, combined with its restrictions on clean syringes, exacerbated the HIV/AIDS outbreak because of needle sharing. And regulation of prescription painkillers has spurred heroin and fentanyl overdoses as consumers switched to underground opioids.

The recent vaping-related hospitalizations and deaths fit this pattern.

Rather than restricting vaping products, a better policy would legalize marijuana broadly and avoid strong restrictions on nicotine or THC vaping products. Prohibition and overregulation drive these products underground and make them more dangerous. It may be counterintuitive to many lawmakers, but legalization, not prohibition, is the answer to making vaping safer.