For more than two decades, Colorado has received hundreds of millions of dollars from its share of settlements with tobacco companies — money that has been used to support dozens of programs, including one that helps first-time moms — that came from lawsuits to recoup the costs of health care spending attributed to smoking-related illnesses.

But that money is already starting to dwindle, so state legislators have scrambled to find a source of funds that could ensure those helpful programs don’t disappear.

The most obvious, if not ironic, source: marijuana money.

“Everyone thought it was mad money, that it would go on in perpetuity, that it could fund everything,” former Sen. Pat Steadman said of his time on the legislature’s Joint Budget Committee and how it viewed tobacco settlement funds flowing into the state. “But we were seeing problems with the declining stream of tobacco revenue. And as marijuana money was increasing, I saw a chance to change the trajectory of some of those programs, instead of seeing them decline just as tobacco money was doing.”

Though the payments from 53 tobacco manufacturers to 46 states are to run a minimum of 25 years and total at least $206 billion — Colorado has already received nearly $1.7 billion for its share of the more than $119 billion thus paid nationally — a smaller stream of that money was about to end.

Colorado was one of seven states to initiate the historic 1995 lawsuit, and each was to receive a decade of supplemental payments beginning in 2008 to repay them their legal work, called a strategic contribution payment. Colorado’s share: roughly $15 million a year.

The last of that funding stream, a $15.5 million payment, came in April 2017.

With it also came a guarantee that future tobacco settlement payments would be smaller, and a number of social service programs that have come to rely on that revenue would be facing inevitable cuts, including Steadman’s favorite project, the Nurse Home Visitor program.

That was “one of the centerpiece programs funded with tobacco money,” the Denver Democrat explained, “and it meets with first-time moms and stays with them for six to nine months after the child’s birth. There’s a great body of evidence for how it helps the low-income mothers, and it’s been suffering from the dropping revenues.”

The nursing program is annually appropriated more than $20 million, the largest block of funds from tobacco settlement revenues, records show, but its share has been dropping each year. That’s because tobacco settlement funds, based on annual sales of cigarettes, have been on the decline. Tobacco settlement dollars are separate and apart from revenues that come from state sales taxes assessed on purchases of cigarette and tobacco products.

“At some point in the future, the last smoker is going to buy the last pack,” Steadman said. “Then what?”

That thought began a detailed discussion on whether excise- and sales-tax revenues generated from marijuana sales could be the new funding stream.

Officials began to dig through the various restrictions tied to tobacco and marijuana revenues to discern whether any of those from the one could be funded by the other.

“We really were trying to see what those allowable uses might be,” Steadman recalled. “We knew there was a $15 million cliff coming and programs would suffer, and we didn’t know which ones would hang on.”

The legislature chose to appropriate about $10 million in marijuana tax money to five programs — but not the home nurse program — that had historically been funded with tobacco settlement money.

That marijuana tax funds are now tied to projects that had relied on tobacco funding isn’t as much a surprise as ironic because of how those monies are sometimes viewed.

“A lot of people may think it’s been a stopgap funder,” Chris Stiffler, of the Colorado Fiscal Institute, said of the Marijuana Tax Cash Fund. “They all ask about the marijuana dollars as if they are the solver of all problems.”

Voters in 2012 passed Amendment 64, legalizing the retail sale of marijuana to adults. In 2013, voters passed Proposition AA, which authorized up to a 15 percent excise tax on wholesale marijuana, with the first $40 million collected to fund local school construction projects. Anything above that $40 million would be for a trust fund used to generate income to support public schools.

But other taxes created on the sale of marijuana have been created, including sales taxes and additional “sin” taxes that have created a large annual pool of cash — projected to hit $300 million in the next few years — from which legislators can draw.

There had been a 2.9 percent sales tax — all of which went into the Marijuana Tax Cash Fund — but that has become a 15 percent special sales tax, of which 71.85 percent goes into the fund. The state’s general fund holds onto 15.56 percent of the special sales tax, and the remaining 12.59 percent is to go into the state public school fund for districts and charter schools.

This year, however, the legislature mandated a flat $30 million to be put into the school fund instead of a percent of the special sales tax, all of it to be disbursed to rural school districts.

The five programs that were once tobacco-settlement funded, but for which the Marijuana Tax Cash Fund is now used in part to pay, include those that address children’s literacy, mental health services for juvenile and adult offenders as well as children under the Colorado Child Mental Health Treatment Act, community prevention programs for alcohol and drug abuse, and several local public health agencies.

Had it not been for pot monies, chances are good these programs would suffer or be shut down, officials say.

“The Marijuana Tax Cash Fund is paying for vital community-based behavioral health treatment for individuals involved in the criminal justice system,” said Jagruti Shah, director of Criminal Justice Services at the Office of Behavioral Health in the Colorado Department of Human Services.

“The localities determine gaps in services for this population and create programs and partnerships to address the needs,” she said. “In the last fiscal year, nearly 2,000 individuals received services through these programs. We’re grateful for Coloradans’ ongoing support, which allows us to continue to provide these crucial services to those who need them.”

And the $1.7 million in marijuana money tagged for local public health agencies is part of a larger $5.5 million appropriation that is distributed to more than 17 organizations statewide, Department of Public Health and Environment records show. The recipient of the most money was Mental Health Center of Denver, for $489,000, followed by AspenPointe in the Denver area for about the same amount.

Then there’s the Early Literacy Grant program, designed to ensure students are achieving reading competency. This year more than $1 million went to eight elementary schools in Moffat and Morgan counties, as well as in the Pueblo and Sangre de Cristo school districts, state Department of Education records show.

Last year, four schools in the Cañon City school district shared more than $500,000, a damper to criticisms that communities far from Denver are not sharing in the deluge of marijuana tax revenues.

But marijuana funding might not be the stopgap legislators initially thought, Steadman said. That offers new concerns that future revenues might stall or dwindle in the face of other states legalizing the drug.

“The irony is now we’re concerned the marijuana money might have peaked, and the legislature made lots of promises with that money, for education and housing,” Steadman said. “I’m actually worried that what was a good idea for that marijuana cash is a source that might be unstable and unsustainable.”