Abdullah Shihipar is a master’s degree candidate at the Brown University School of Public Health. Brandon D.L. Marshall is an associate professor of epidemiology at the school.

As states and municipalities begin to settle the more than 1,000 lawsuits filed against pharmaceutical companies over the opioid crisis, it may appear as though this chapter in the epidemic is coming to a close. After all, it seems obvious that the money drawn from these lawsuits should go toward combating the crisis, given that an opioid overdose is still one of the leading causes of the death in the United States.

But with state and municipal governments, hospital systems and even the federal government all jostling for their piece of the pie, making sure the money from these settlements goes where it’s needed most will be much more complicated. Fortunately, there’s a valuable example to learn from: the mistakes and successes of the 1998 Tobacco Master Settlement Agreement.

That agreement between the attorneys general of 46 states and tobacco companies provided states with billions of dollars, theoretically pledged toward tobacco-prevention programs. Some states implemented these efforts at first, but balancing states’ budgets soon took precedence. Only Florida managed to permanently ensure that its funds would be reserved for public health by passing a state constitutional amendment in 2006. Today, less than 3 percent of funds are allocated for smoking prevention and cessation programs.

The same pattern threatens to play out with opioids settlements. Take Oklahoma, for instance: After the state and Purdue Pharma, the maker of OxyContin, settled a lawsuit that alleged the company had aggressively and deceptively marketed the drug for $270 million, the money was allocated to a new addiction-treatment and research center at Oklahoma State University. This prompted backlash from state officials who felt they were left out of the process. With two more lawsuits left to go (against Teva Pharmaceuticals and Johnson & Johnson, respectively), the Oklahoma legislature passed a law mandating that any funds be directed into the general treasury. The parties also reached an agreement that the funds from the Teva lawsuit would be used to “help abate the ongoing crisis the state is facing,” with the legislature charged with making specific provisions.

That even a single state has faced these logistical challenges to managing its settlement shows just how hard it would be to come to a master agreement with opioid producers, even if officials can agree to coordinate in seeking one.

Some state attorneys general have signaled their opposition, arguing it undercuts any national agreement the states may reach. And in an echo of the redirection of the tobacco master settlement funds, some officials have discussed settlements about “recuperating and recovering” costs. While no one would deny that the opioid crisis has put a massive strain on government coffers, it would be a poor investment to spend settlement money balancing budgets, rather than putting resources toward the ongoing crisis.

But while the tobacco master settlement provides a warning, it also suggests possible ways forward. In that case, attorneys general did not know whether they had the authority to direct funds over the wishes of their legislatures. Laws could be passed that require state legislatures to direct funds to evidence-based treatment programs and overdose prevention. States could also choose to follow Florida’s approach and ask voters to pass a state constitutional amendment.

A number of public-health professionals also filed a friend of the court brief in May, suggesting that any opioids agreement create an independent nonprofit organization, which could then ensure that any settlement resulted in meaningful public-health action.

Money from the settlement could be used to bolster or establish statewide opioid commissions. This has been a successful model in Rhode Island, where the governor’s overdose task force has successfully worked with local partners across the state to reduce high-risk opioid prescribing, boost access to treatment, increase naloxone distribution and improve recovery resources.

Funds could also be used to fundamentally reshape the delivery of addiction treatment in the United States. One recent study found that almost half of all counties lack access to medications for opioid-use disorder, the gold-standard treatment for opioid addiction. A program akin to the Ryan White program for HIV/AIDS treatment could ensure that everyone suffering from opioid addiction has access to lifesaving treatment.

Ideally, any settlement would include a provision requiring legislatures to pass laws allocating the funds to treatment, harm reduction and overdose prevention programs, while leaving states the freedom to figure out specifics based on the realities in their state. An advisory committee could be tasked with making specific recommendations to inform these decisions. It’s clear that a settlement would have to be between states; an agreement with thousands of municipalities signed on that ensures money is properly allocated would be logistically difficult, if not impossible.

A master settlement for opioids has the potential to dramatically affect our response to the crisis. However, government officials need to work together to get to a settlement that directs funds to the people who need it most — not the members of budgeting committees but victims of the opioid epidemic.

Read more: