Florida is suing the nation’s two largest drugstore chains, Walgreens and CVS, alleging they added to the state and national opioid crisis by overselling painkillers and not taking precautions to stop illegal sales.

The state attorney general, Pam Bondi, announced late on Friday that she had added the companies to a state-court lawsuit filed last spring against Purdue Pharma, the maker of OxyContin, and several opioid distributors.

Bondi said in a press release that CVS and Walgreens “played a role in creating the opioid crisis”. She said the companies failed to stop “suspicious orders of opioids” and “dispensed unreasonable quantities of opioids from their pharmacies”. On average, about 45 people die nationally each day because of opioid overdoses, according to the Centers for Disease Control and Prevention.

“We will continue to pursue those companies that played a role in creating the opioid crisis,” said Bondi, who has been mentioned as a possible replacement by President Donald Trump for the recently ousted US attorney general, Jeff Sessions. “Thousands of Floridians have suffered as a result of the actions of the defendants.”

A CVS spokesman, Mike DeAngelis, called the lawsuit “without merit” in a statement on Saturday. He said the company trains its pharmacists and their assistants about their responsibilities when dispensing controlled substances and gives them tools to detect potentially illegal sales.

Walgreens said on Saturday it does not comment on pending lawsuits.

Until a law enforcement crackdown at the beginning of the decade, Florida was known for its so-called pain mills. Drug dealers from throughout the country would send associates to store-front clinics where unscrupulous doctors would write opioid prescriptions for bogus injuries and illnesses. At one point, 90 of the nation’s top 100 opioid prescribers were Florida doctors, according to federal officials.

After receiving the prescriptions, the phoney patients would buy the pills from Florida pharmacies – state law says pharmacists must refuse to fill prescriptions they suspect are not for a valid purpose. Most of the opioids would then be taken out of state to be resold illegally at huge markups, creating a drug crisis in many communities throughout the eastern United States.

According to the lawsuit, Walgreens has dispensed billions of opioid dosages from its Florida pharmacies since 2006. The Illinois-based chain is the nation’s largest drugstore chain and has more than 13,200 stores globally.

The company distributed 2.2m opioid tablets from its store in Hudson, a Tampa-area town of 12,000, and in one unidentified town of 3,000, sold 285,000 pills in a month, the lawsuit says. In some stores, its opioid sales jumped sixfold in two years.

Florida’s accusations against CVS were more general, saying it sold 700m opioid dosages between 2006 and 2014, including outsized sales in Hudson and two other nearby towns. The Rhode Island-based chain has more than 9,800 stores.

