Attorney General Kris Mayes announced that $380 million in opioid settlement funds will make its way to Arizona.

It is part of a national agreement with drug makers Teva and Allergan, as well as pharmacies Walgreens and CVS.

“While no amount of money can fully make up for the disastrous impact opioids have had on Arizonans, these dollars will play a crucial role in helping communities meet the needs of those suffering from this crisis,” Mayes said in a statement.

Breaking down the funds Arizona will receive by company:

Teva: $92.9 million Allergan: $51.2 million Walgreens: $123.3 million CVS: $113.3 million

The funds will be dispersed over the course of 15 years. $213 million will go local governments across the state, while the remaining $167 million will be allocated to state-level efforts.

All four of the companies will also be required to put protocols in place to help prevent opioid misuse.

“These agreements mark a significant step forward in Arizona’s efforts to combat the devastating effects of the opioid crisis on individuals, families, and communities across our state,” Mayes said.