RALEIGH, N.C. (WNCN) — North Carolina Attorney General Josh Stein and other attorneys general have reached a $10 billion settlement with Walgreens and CVS for their alleged roles in the opioid crisis.

CVS will pay $5 billion and Walgreens will pay $5.7 billion as part of this agreement. Both retailers and their pharmacies will also be required to monitor, report, and share data about suspicious activity related to opioids.

North Carolina will receive more than $1 billion through this deal. A multi-billion dollar settlement was also reached with Walmart last month.

“We wanted to make sure that we held them accountable and made them pay and at the same time, we are making them change their business practices so that something like this never happens again,” Stein said.

Stein said this money will go to county governments to spend on recovery and prevention efforts.

“So many more North Carolinians will be alive and healthy next year and the year after that and the year after that than otherwise would’ve been but for these settlements,” Stein said.

CBS 17 reached out to Walgreens and CVS for responses. CVS said in a statement “we are pleased to progress to a formal agreement and move forward in the resolution of these claims that date back a decade or more.”