DENVER (AP) — Colorado voters overwhelmingly rejected a ballot measure Tuesday asking if the state could keep excess tax revenue, while a separate measure that would legalize sports betting was too close to call.

Democrats who control the statehouse had referred the tax revenue measure, called Proposition CC, to the ballot. It asked if the state could keep revenue in those years when it has a surplus and is required to return that money to taxpayers.

The revenue would have been allocated to transportation and transit, K-12 schools and higher education. Preliminary returns showed the measure losing by a double-digit margin.

The campaign reflected longstanding philosophical differences over the 1992 Taxpayer’s Bill of Rights, a constitutional amendment that requires voters’ approval of any new taxes or revenue retention measures.

Democrats blame TABOR’s revenue restrictions for chronic underinvestment in Colorado’s schools, roads and universities.

Republicans credit TABOR for keeping taxes low on the private sector, allowing it to fuel the state’s economic growth.

Coloradans have voted repeatedly against most state tax increases. Opponents of Tuesday’s measure claimed they’d done so again — bucking the will of Democrats who contended CC wasn’t a tax rate hike.

“Tonight’s outcome reflects an important and continued trend,” Michael Fields, executive director of the conservative advocacy group Colorado Rising Action, said in a statement. “At their core, Coloradans remain fiscally prudent.”

TABOR also sets an annual state income limit that can trigger tax refunds based on a formula that involves population and inflation. Proposition CC’s opponents called the ballot measure a prelude to seeking full repeal of TABOR.

“Proposition CC would have eroded Coloradans’ constitutional protection from irresponsible spending and voters were right to reject it,” said Jesse Mallory, Colorado state director for Americans for Prosperity.

Legislative leaders from both parties endorsed the second ballot question, Proposition DD, saying it was time to bring sports betting out of the dark and tax it for water needs.

Despite a lack of organized opposition during the campaign, votes for and against the sports betting measure were agonizingly close with more than 1.2 million ballots counted.

A mandatory recount could be triggered if the difference in votes is less than or equal to 0.5% of the number of the highest votes cast. A recount can be requested if the difference is higher than that threshold, but the requestor would have to post a bond to pay for one.

Proposition DD called for a 10% flat tax on net sports betting proceeds. Parent companies operating the state’s 33 casinos could seek licenses for onsite betting as well as online and sports gambling apps.

Separate legislation passed this year would allow the Colorado Water Conservation Board to use the tax revenue — estimated at $11 million in fiscal year 2020-21 — for grants that further the goals of a state water plan launched under former Gov. John Hickenlooper.

The plan is a living document setting long-term goals to meet the needs of a growing population, agriculture, outdoor recreation and obligations to Southwestern states that rely on the Colorado River.

The state has yet to find a way to meet the water plan’s estimated price tag of $100 million a year. But the sports betting proposal harvested a coalition of environmentalists and farming groups supporting it.

Legal sports betting has grown since New Jersey won a U.S. Supreme Court case in 2018 allowing all 50 states to offer it. But most states that moved quickly to do so have seen limited tax revenue.

An Associated Press analysis shows that seven states that reported on sports betting revenue for the fiscal year that ended in June generated a total $74 million in state taxes — a drop in the bucket for state budgets.

Reasons varied, from slow rollouts to the unavailability in some places of mobile betting.