Purdue Pharma, the maker of OxyContin, filed for Chapter 11 bankruptcy protection Sunday night, just days after striking a settlement with more than 2,000 local governments over its alleged role in creating and sustaining the deadly opioid crisis.

The filing in New York follows owners the Sackler family agreeing to surrender control of the lucrative company and offering $3 billion in cash over several years, and future revenue from the sale of OxyContin to assist communities hardest hit by the opioid epidemic.

On Sunday, Purdue's board of directors approved the settlement with 24 state attorneys general, who sued the company, accusing it of fueling the nationwide addiction crisis by aggressively marketing OxyContin while downplaying its potential for addiction.

Following Sunday's bankruptcy filing, the company's board members said the deal struck with the thousands of state and local governments that sued will provide billions to combat the country's opioid crisis.

"This settlement framework avoids wasting hundreds of millions of dollars and years on protracted litigation, and instead will provide billions of dollars and critical resources to communities across the country trying to cope with the opioid crisis," said Steve Miller, chairman of Purdue's board of directors, in a statement to NPR.

"We will continue to work with state attorneys general and other plaintiff representatives to finalize and implement this agreement as quickly as possible," he added.

The drug maker said the value of the settlement is around $10 billion, but the states opposed to the deal have contested that estimate.

Fierce resistance persists from about half the states, which have refused to support the settlement and instead have vowed to take the Sacklers to state courts in an attempt to tap into the family's fortunes tied up in foreign investments.

According to the lawsuits by the states, Purdue paid extra money to doctors who were willing to back their drug's effectiveness and safety.

The bankruptcy filing follows a statement by New York's state attorney general, Letitia James, alleging that investigators discovered nearly $1 billion in wire transfers made by Purdue to Swiss bank accounts — allegedly to conceal the family's wealth from legal liability.

Purdue has pointed out that its products were approved by the Federal Drug Administration and that doctors were prescribing them to address patient pain. But the plaintiffs in the suits argue that company officials intensively marketed opioids and downplayed their addictive risks, laying the groundwork for the opioid crisis, which has claimed tens of thousands of lives and has been declared a national emergency.

Purdue Chairman Miller says the company has not admitted to any wrongdoing as part of settlement negotiations.

"The resumption of litigation would rapidly diminish all the resources of the company and would be lose-lose-lose all the way around," he said in the statement. "Whatever people might wish for is not on the table now."

Copyright 2019 NPR. To see more, visit https://www.npr.org.