Denver will become the first US city to effectively decriminalize mushrooms containing the psychedelic psilocybin, also known as “magic mushrooms.”

Initiative 301 makes the personal use and possession of psilocybin mushrooms among people 21 and older the lowest possible law enforcement priority in Denver. It also prohibits the city from spending resources to pursue criminal penalties related to the use or possession of psilocybin mushrooms among people 21 and older.

And the initiative sets up “the psilocybin mushroom policy review panel to assess and report on the effects of the ordinance.”

The initiative doesn’t legalize magic mushrooms; they remain illegal under state and federal law. And it doesn’t decriminalize or deprioritize enforcement against the distribution and sales of psilocybin mushrooms — all of that could still be pursued by police.

According to the Washington Post, Denver police arrested about 50 people a year over the past three years for possession or sale of psilocybin, and prosecutors acted on just 11 of the cases. That’s out of thousands of arrests overall in the city each year.

Voting began in Colorado, which does mail-in voting, last month and mostly concluded Tuesday (although a very small number of overseas and military votes can still come in). Things looked bad for the initiative late Tuesday, as it trailed behind in the results. But on Wednesday, the final tally came in — and showed Initiative 301 narrowly won with nearly 51 percent of the vote, according to the Denver Post and New York Times.

The results will be certified on May 16.

Advocates for the measure argue that decriminalization would shift law enforcement resources away from pursuing nonviolent offenses. They claim that psilocybin is safe, nonaddictive or close to nonaddictive, and that a growing body of evidence suggests the drug has therapeutic benefits for illnesses ranging from depression to end-of-life anxiety to addiction.

Opponents worry that decriminalization could lead to more drug use. Especially in Denver, they’re concerned that decriminalization could perpetuate the city’s reputation as “a drug-friendly city,” Jackson Barnett reported for the Denver Post. Critics also point out psilocybin does have some risks — particularly, experts say, the possibility of accidents and traumatic experiences that can be psychologically damaging (especially among people predisposed to mental illness).

One potential source of real-world evidence on this: Portugal. After the country decriminalized all drugs, it saw a decrease in drug-related deaths and drops in reported past-year and past-month drug use, according to a 2014 report from the Transform Drug Policy Foundation. But it also saw an increase in lifetime prevalence of drug use, as well as an uptick in reported use among teens after 2007.

But Portugal also simultaneously adopted special commissions that attempt to link people with drug addictions to treatment. Although the success of the commissions has yet to be thoroughly evaluated, it’s possible that even as decriminalization increased drug use, the commissions and more access to treatment got so many people off drugs that drug use still fell overall.

Still, decriminalization alone may have its benefits. A 2009 report from the libertarian Cato Institute, written by Glenn Greenwald, concluded that decriminalization freed people from the “fear of arrest” when they sought help for their addiction and “freed up resources that could be channeled into treatment and other harm reduction programs.”

What effects psilocybin decriminalization will have in the US, Colorado, or Denver, however, remain to be seen. Even more so than marijuana legalization, this is an area of policy that’s largely untested in modern America.

This kind of pioneering vote isn’t new for Denver or Colorado as a whole. In 2012, Colorado and Washington state became the first two states to legalize marijuana for recreational use.

Other places, particularly Oregon and California, are considering measures to change their laws regarding psilocybin as well.

But Denver has broken ahead of the pack, becoming the first US city to effectively decriminalize magic mushrooms.

Watch: How LSD and shrooms could help treat anxiety, addiction, and depression

Sign up for the Future Perfect newsletter. Twice a week, you’ll get a roundup of ideas and solutions for tackling our biggest challenges: improving public health, decreasing human and animal suffering, easing catastrophic risks, and — to put it simply — getting better at doing good.