DAYTON, Ohio (WDTN) – Ohio Attorney General Dave Yost and other attorneys general are preparing a settlement after an investigation into the part Walmart has played in the opioid epidemic.

According to a release, Yost worked with attorneys general from 15 other states worked out a preliminary deal after they say Walmart failed to properly oversee the dispensing of opioids from roughly 5,000 pharmacies nationwide.

The settlement would not only force Walmart to improve oversight over its pharmacies but also include $3.1 billion for participating states, cities, counties and other local governments. These funds will provide treatment and recovery services to people struggling with opioid use disorder in the included areas.

“Anytime we can get a worldwide company like Walmart to implement systematic changes that will benefit Ohioans long-term, I’d say that’s a significant win,” Yost said. “This resolution brings meaningful relief to our communities in need. Let’s put this money to good use.”

Ohio alone will receive more than $114 million if the agreement is signed, the release said. The final amount will be based on participation in settlement agreements from cities, counties and other local governments.

“This agreement puts financial incentives in place that could make a real difference in the lives of Ohioans,” Yost said. “I hope other companies will follow Walmart in reaching a national agreement.”