It appears that Massachusetts deserves credit for treating the opioid addiction crisis with the seriousness that it warrants.

A recent study found that state officials are bucking efforts by makers of prescription painkillers to kill or weaken measures aimed at stemming the tide of prescription opioids.

Many experts on the current plague say that addiction often starts with prescribed painkillers that are too easy to obtain and abuse. Itโ€™s not until later, when bound tightly to the addiction, that many people turn to the cheaper alternative of heroin.

The drugmakers say theyโ€™re combating the addiction epidemic, but The Associated Press and the Center for Public Integrity found theyโ€™ve adopted a 50-state strategy โ€” including hundreds of lobbyists and millions in campaign contributions โ€” to resist proposals to rein in drugs like OxyContin, Vicodin and fentanyl helping fuel the nationโ€™s overdose crisis.

It appears that while we fight addictionโ€™s spread, we also have to contend with the dark impulses of capitalism. To their credit, our state leaders seem to be pushing that shadow force into the sunlight.

Massachusetts this year passed one of the countryโ€™s toughest laws intended to curb opioid-related deaths, despite drugmaker campaign contributions.

Between 2006 and 2015, the drugmakers and their allies contributed more than $122,000 to state candidates and parties in Massachusetts, which ranks our state 46th. In this case coming in near the bottom feels like a good thing.

Among direct contributions to elected officials in Massachusetts. Republican Gov. Charlie Baker has received more than $16,000 from the drugmakers and their allies going back to 2009. Thatโ€™s a relatively small amount considering Baker now has nearly $4 million in his campaign account. State Senate President Stan Rosenberg, a Democrat, has received $200. Another top Democrat โ€” Attorney General Maura Healey โ€” has received $750. House Speaker Robert DeLeo, a Democrat, has received about $3,600 in similar donations since 2006.

Despite the contributions, in March, the state adopted one of the most comprehensive laws in the nation to combat opioid addiction, including a seven-day limit on first-time prescriptions for opiate painkillers.

The law also requires overdose victims seeking help at hospital emergency rooms to be evaluated in 24 hours, allows patients to fill only part of their painkiller prescriptions at a time, requires schools to verbally screen students for potential drug abuse and provides doctors with information on non-opioid pain management options.

The law also requires doctors and other prescribers to check the stateโ€™s Prescription Monitoring Program each time they prescribe an opioid, to make sure patients are not seeking multiple prescriptions.

This is a laudable effort, but only one of many needed to head off addiction in the first place, to treat those whoโ€™ve been ensnared by the brain-altering chemicals, and to prevent overdose deaths.

In fact, recent reports indicate that most of the current opioid overdose deaths are from heroin laced with powerful and dangerous substances like fentanyl, and not so much from abuse of prescription drugs.

This is a long-term battle that must be fought on many fronts.