CHARLESTON, W.Va. — Oxycontin-maker Purdue Pharma has filed bankruptcy, the first step in a proposed settlement with states and more than 2,000 local governments that filed suit over devastation caused by the opioid epidemic.

The drug giant’s board of directors voted Sunday evening to move forward with the bankruptcy.

The company would dissolve, forming a trust that would continue to produce Oxycontin as well as overdose “rescue’’ drugs that would be distributed at no cost to communities across the country.

And under the proposal with states and local governments, the bankruptcy would include a structured settlement, providing greater certainty than a normal claim might.

“We are hopeful of and expectant that a growing number of states will see this is a much better outcome for them than for us to go into the swamp of litigation that would basically eat up all the resources of the company,’’ Purdue Chairman Steve Miller stated.

All told, the deal would be worth $10 billion to $12 billion, media outlets were reporting. The proposed settlement does not include an admission of guilt.

West Virginia has been one of the states hardest hit by the opioid crisis. Attorney General Patrick Morrisey announced in March a lawsuit against Purdue Pharma and the Sackler family,which owns the company.

Morrisey last week confirmed that he is among the attorneys general from 27 states and territories in favor of the settlement.

“I put West Virginia on the original framework to keep our position alive because if we didn’t and we were in bankruptcy, we might as well take the long ride off the short train,” Morrisey said this morning on “Radio Roundtable” on WJLS.

“We would be in position to get crumbs, rather than what I’m hopeful will be a meaningful amount to hold the company accountable.”

But Morrisey has said West Virginia could be pulled out of any agreement if it starts to seem like it wouldn’t benefit the state.

“If we don’t get what West Virginia needs out of this settlement then I will pull the state off and we’ll keep pushing,” he said. “But I am concerned about a potential position in bankruptcy where we could get practically nothing.”

Attorneys General in some states are not taking part. Those include Vermont, Connecticut, Iowa, Massachusetts, Nevada, New Jersey, New York, Pennsylvania, North Carolina, and Wisconsin.

The Attorney General’s Office in New York has said it uncovered about $1 billion in wire transfers between the Sackler family and international financial institutions, an allegation that the family has tried to shield its wealth from lawsuits.

“While the Sacklers continue to lowball victims and skirt a responsible settlement, we refuse to allow the family to misuse the courts in an effort to shield their financial misconduct,” New York Attorney General Letitia James stated.