Minnesota is now in line to receive $296 million over 18 years to deal with the state's opioid crisis, thanks to hard work and collaboration among counties, local governments and the state attorney general's office.

The recent agreement will send tens of millions of dollars to communities that have suffered the brunt of opioid overdoses among their residents. That is a welcome infusion of funds that can be used to expand addiction recovery efforts, treatment, intervention, additional law enforcement, child protection, education and cover a host of other expenses from the epidemics.

It is part of a massive, $26 billion, nationwide settlement with manufacturer Johnson & Johnson, which was accused of downplaying the addictiveness of opioids, and distributors Cardinal Health, AmerisourceBergen and McKesson, which willingly filled orders for even the most inordinate amounts of addictive drugs from pharmacies across the country.

The final agreement in Minnesota is the result of months of collaborative work among local governments that initially were skeptical of ever seeing a share of opioid litigation. In Minnesota more than two dozen counties and seven cities had already filed their own lawsuits. The agreement requires those governments to forgo future litigation in return for a specific share of the settlement, with local governments receiving 75% of the funds and the state 25%.

That was a wise decision, because many local governments would have been hard-pressed to wage successful lawsuits against the formidable resources of the pharmaceutical industry. The agreement is a solid one that specifies funding for overdose prevention, recovery, outreach and other expenses while requiring safeguards that subject distributors to new monitoring requirements.

"This is a historic agreement," Attorney General Keith Ellison told an editorial writer. "These are companies who went out of their way to deceive people, who were prolific in pushing these drugs along with distributors and marketers. They hid information. It was an elaborate scheme that resulted in nearly 5,000 deaths in Minnesota alone."

One of those who suffered a personal toll was Rep. Dave Baker, R-Willmar, who lost his 25-year-old son in 2013 to a heroin overdose that started out as an addiction to legally prescribed opioids for a back injury. Baker, who now leads the state's Opioid Response Advisory Council, was a key leader in the yearslong effort to bring pharmaceutical companies' misdeeds to light. His advisory council will oversee dispersal of the state's share of funds.

"I'm very proud of how the attorney general's office, the Association of Minnesota Counties and other local officials worked together on this," Baker said. "This is the best deal we're going to get and the funds will do so much good."

Ellison also praised Baker's work. "There is one guy who I really think acted in a heroic way through all of this," Ellison said. "Dave Baker was tireless. He never stopped. He was always willing to tell the story of his son, no matter how painful it was to him."

That is the kind of partnership Minnesota could use more of. It brings people together. It brings results. Baker said the next step will be legislation needed to unlock the funds. That too, he said, has bipartisan support, which in the Senate will be led jointly by Sen. Julie Rosen, R-Fairmont, who leads the powerful Finance Committee, and DFL Sen. Chris Eaton of Brooklyn Center.

The legislation is needed to ensure certain guidelines are met that will prevent the opioid settlement from meeting the fate of the tobacco settlement, which an earlier Legislature tapped to get out of a general budget shortfall. "That's not going to happen here," Baker said. "This will be specifically for addiction and opioid-related services."

Minnesota owes a debt to all those who worked so long and hard to produce this agreement, which will pay dividends for years to come. We urge legislators to come to a rapid agreement that will guide and preserve the funds for their intended purpose.