Denver is poised to become the first city in the nation to effectively decriminalize psychedelic mushrooms.

After closing an early vote deficit Tuesday night and early Wednesday, final unofficial results posted late in the afternoon showed a reversal of fortune — with Initiative 301 set to pass narrowly with 50.6 percent of the vote. The total stands at 89,320 votes in favor and 87,341 against, a margin of 1,979.

The Denver Elections Division will continue accepting military and overseas ballots, but typically those numbers are small. Results will be certified May 16.

“It’s been one hell of a 21 and a half hours,” Initiative 301 campaign manager Kevin Matthews said. “If these results hold, this is an example of the absurd comedy of the great metaphor. Against all odds, we prevailed. This is what happens when a small team of dedicated and passionate people unite under a single idea to create change.”

RELATED: Questions about Denver’s decriminalization of magic mushrooms? We have your answers

Denver’s vote has attracted national attention. While efforts are afoot to get psilocybin-related measures on the ballot in Oregon and California in 2020, Denver hosted the first-ever U.S. popular vote on the matter, according to organizers. An earlier effort in California last year failed to qualify for the ballot.

Though Initiative 301 attracted no organized opposition, critics of Colorado’s legalization of marijuana lamented the prospect of Denver blazing yet another trail they see as misguided and potentially harmful.

The measure essentially tells police to look the other way on adult psilocybin use.

“We’ll see what the final numbers are, but we’re a little stunned to see a 7,000-vote flip overnight on that,” said Jeff Hunt, director of the Centennial Institute at Colorado Christian University, who initially questioned on Twitter whether vote-tampering was involved. “We’ll continue to fight the growing drug culture. Denver’s becoming the illicit drug capital of the world. The larger issue here is not good for our city.”

He added: “Marijuana has brought more problems than it’s solved to our city and our state, and if we continue to go down this track, we’re going to continue to see Colorado get in worse and worse shape.”

Supporters extolled emerging research showing potential health benefits with psychedelic mushrooms. The measure likely was put over the top by younger voters, who tend to cast their ballots closer to or on Election Day, even though all registered voters receive their ballots in the mail about three weeks earlier.

Last fall, the U.S. Food and Drug Administration granted psilocybin “breakthrough therapy” designation for its potential to help with treatment-resistant depression, a status that speeds up the development and review process for a medicine containing the substance.

What Initiative 301 tells police to do

As written, I-301 directs police via ordinance to treat enforcement of laws against possession of psilocybin mushrooms as their lowest priority. It also bars the use of city resources or money to impose criminal penalties.

It’s similar to decriminalization measures approved by Denver voters for marijuana years before Colorado’s Amendment 64 won statewide approval.

“Our victory here is a clear signal to the rest of the country that we’re ready for a broader conversation around psilocybin and its potential benefits,” said Matthews, a 33-year-old stay-at-home dad.

Psychedelic mushrooms still would remain illegal to buy, sell or possess, with the latter crime a felony that carries a potential punishment of up to a year in prison and a fine. But Initiative 301 backers hope to lower the risk users face of getting caught with mushrooms.

Past marijuana efforts are instructive, though. Denver voters signed off on decriminalization measures in 2005 and 2007, but that didn’t stop police from enforcing the law — though drug law-liberalization advocates say the public discussion prompted by the ballot initiatives helped pave the way for statewide legalization in 2012.

“I’ll say this: We’re looking forward to creating a positive relationship with city officials,” Matthews said. “We have the resources ready to make sure the Justice Department, the (district attorney’s) office and the Denver Police Department have the education they need to implement this in a way that’s fair.”

Initiative 301 requires the city to create a panel to monitor the effects and implementation of the ordinance.

Tide turned Wednesday

Some national media outlets as well as the Centennial Institute wrongly called I-301 a bust late Tuesday, based on the early results.

But the gap tightened throughout the night. By 1 a.m. Wednesday, when Denver Elections put out its last release before pausing counting for the night, the measure still was losing by 3.4 percentage points.

It overcame that margin in the next — and final — round of results shortly after 4 p.m.