DENVER -- Colorado became the 19th U.S. state to legalize some form of sports betting as election officials tallied Wednesday a surprisingly close vote in which ballots for the measure narrowly surpassed "no" votes.

More than 1.3 million Coloradans voted Tuesday on Proposition DD, a bipartisan ballot measure crafted by lawmakers that legalizes sports betting next year and taxes it to fund a state water conservation plan.

It led by a 51%-49% margin mid-afternoon Wednesday, according to unofficial returns.

Legal sports betting has spread since New Jersey won a U.S. Supreme Court case in 2018 allowing all 50 states to offer it. But most states have generated limited tax revenue.

An Associated Press analysis showed that seven states that reported on sports betting revenue for the fiscal year that ended in June generated just $74 million in state taxes.

Starting next May, Colorado's 33 casinos can offer in-person and online wagering on professional, collegiate, motor and Olympic sports.

The proposal calls for a 10% flat tax on net sports betting proceeds, which is estimated to total about $11 million in the next financial year that starts July 1. State lawmakers passed a bill earlier this year allowing the Colorado Water Conservation Board to use that money to award grants to help meet the state's water plan.

Democratic House Majority Leader Alec Garnett is a co-sponsor of the legislation behind the measure, along with Republican House Minority Leader Patrick Neville.

Garnett and Neville cited several factors Wednesday for the close vote, including voters' rejection Tuesday of another tax measure that would have allowed the state to keep revenue it currently is obligated to refund to taxpayers.

The betting ballot language didn't help, Garnett said.

It read, in part: "Shall state taxes be increased by twenty-nine million dollars annually to fund state water projects and commitments and to pay for the regulation of sports betting. ..."

That language is inspired by the Taxpayer's Bill of Rights, a 1992 constitutional amendment that requires voter approval of any new taxes, tax increases, revenue retention measures and bonding.

TABOR is the reason Colorado lawmakers turned to voters to legalize sports betting rather than doing it themselves.

"We campaigned hard to explain to people that this is a new tax — but on something that right now is totally illegal," said Neville, a strong TABOR defender who opposed the other measure. "This was as close as it was because a lot of voters got the two mixed up."

Proposition DD asked for the $29 million so that lawmakers wouldn't have to go back to voters as revenue from sports betting grows. Initial revenue is estimated to be $11 million next fiscal year.

"TABOR requires us to start with, 'Shall we raise taxes,'" Garnett said. "There's a baseline of voters in Colorado — it doesn't matter if you're taxing casinos or puppies — they're going to be against taxes, period."

Gambling is strictly controlled in Colorado, and table limits are among the lowest in the country. Casino betting is restricted to card games, slots and roulette. Maximum bets are $100.

"Colorado has a unique relationship with gaming, and many voters don't know we already have a responsible framework to regulate it," Garnett said.

Tyler Sandberg, a veteran GOP consultant, also said voters' rejection of Proposition CC "bled into the sports question" and induced many to vote no.

It happened in 2018, when voters rejected competing ballot measures to increase state funding for schools and transportation.

"I also think there is the quandary of how Colorado voters feel about gambling," Sandberg said, citing the restrictions imposed by voters on casino gambling.

It's likely that sportsbooks companies that are already operating around the country, like DraftKings or FanDuel, would manage the betting for the casinos. The two companies spent more than $1.5 million combined to support Proposition DD.