Every Minnesota county and more than 140 cities have signed onto a massive opioid settlement that could net local governments millions of dollars to spend on treatment centers, education campaigns and other programs to address the public health crisis.

The proposed agreement would resolve lawsuits against Johnson & Johnson and drug distributors Cardinal Health, AmerisourceBergen and McKesson, which are among the richest companies accused of fueling the opioid epidemic with irresponsible marketing and inadequate monitoring.

Minnesota could see $296 million of the $26 billion that would be paid out over 18 years to states and local governments across the country, including more than 6,000 that had signed onto the settlement by the Wednesday deadline, according to Reuters.

Opting into the settlement means states and localities give up the right to pursue future litigation seeking to hold the drug companies accountable for the opioid crisis, which has led to thousands of overdose deaths in Minnesota.

The companies have until Feb. 25 to decide whether they think enough local governments are participating in the deal to proceed.

In Minnesota, the state will receive 25% of the settlement payout; the remaining 75% will be split between counties and eligible cities.

To determine the how to divvy up the state's payout, Attorney General Keith Ellison convened a panel of public health officials, medical practitioners and first responders, as well as representatives from the Association of Minnesota Counties, League of Minnesota Cities and Coalition of Greater Minnesota Cities.

"People don't die of an overdose at a state level, they die — and they suffer addiction — in local communities," Ellison said in an interview. "We're going to put the money where the pain is."

Funds will be divided among local governments using a formula based on federal data on opioid use disorder, overdose deaths and opioid shipments into Minnesota.

The money local governments receive will be "front loaded" so they get more at the start of the 18-year term of distribution, Ellison said. Counties and cities may also be eligible for money from the state's portion of the payout.

Local governments could see settlement installments as soon as April, though state legislators must adjust regulations before the money can be distributed as planned, said John Stiles, spokesman for the Attorney General's Office.

Julie Bauch, opioid response coordinator for Hennepin County, said the settlement funds will allow the county to launch data-driven efforts tailored to reach populations that have been hit hard by the epidemic. Those include the Somali and East African communities, Native Americans, African Americans and the unsheltered homeless.

The money will be spent on prevention, Bauch said, possibly including public health campaigns targeting youth, schools, clinic settings or emergency rooms.

"There are a few angles that we could take ... and I think a lot of it will have to be community-driven," she said.

After initially opting out of the settlement in December, Burnsville became the final eligible city to sign onto the agreement with a 3-2 vote at Tuesday's City Council meeting.

City Council Member Cara Schulz, who cast one of the opposition votes, said she thinks lawsuits against opioid makers and distributors have contributed to over-regulation of drugs that can make it difficult for chronic pain patients to get the medication they need. She said she couldn't vote to take the money because it was "so tainted in human misery."

Ellison pushed back on that argument, saying: "If people are properly prescribed the proper amount of pain medication, that's a good thing. We're not trying to stop that." He said securing the last city's approval was "a great relief."

In St. Louis County, officials are recruiting community members for an advisory group to help decide how to spend the anticipated settlement funds, which can only be used for opioid-related expenses.

"It's inadequate for the severity of the crisis that we're facing, and yet it's such an exciting opportunity and it's a huge responsibility to use the money wisely," said Linnea Mirsch, the county's director of public health and human services.

Minnesota could also receive tens of millions more dollars from pending bankruptcy plans with pharmaceutical companies Purdue Pharma and Mallinckrodt, according to the Attorney General's Office. The state is expected to follow a similar state-local allocation formula for those payments.

With the increasing spread of fentanyl and the isolation of the COVID-19 pandemic leading to record-breaking numbers of overdose deaths nationwide, local officials said their resources to respond to the epidemic have become increasingly stretched thin.

"We all know that this money has never been needed more," Mirsch said.